{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# wook06"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>cname</th>\n",
       "      <th>dotcount</th>\n",
       "      <th>exp</th>\n",
       "      <th>ifshowcode</th>\n",
       "      <th>memo</th>\n",
       "      <th>name</th>\n",
       "      <th>nodesort</th>\n",
       "      <th>sortcode</th>\n",
       "      <th>tag</th>\n",
       "      <th>unit</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A010101</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>0</td>\n",
       "      <td>指地级行政单位即介于省级和县级之间的一级地方行政区域的个数，包括地区、自治州、行政区和盟。</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010102</th>\n",
       "      <td>地级市数</td>\n",
       "      <td>0</td>\n",
       "      <td>市是省、自治区内人口较集中，政治、经济、文化等方面较重要的城市。市人民政府为一级地方行政组织...</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>地级市数</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010103</th>\n",
       "      <td>县级区划数</td>\n",
       "      <td>0</td>\n",
       "      <td>县级行政单位指中国地方二级行政区域，是地方政权的基础。县级行政单位包括县、自治县、旗、自治旗...</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>县级区划数</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010104</th>\n",
       "      <td>市辖区数</td>\n",
       "      <td>0</td>\n",
       "      <td>市辖区（简称区）城市基层政权组织的行政区域。直辖市和较大的市多将市区范围划分为若干区，设立区...</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>市辖区数</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010105</th>\n",
       "      <td>县级市数</td>\n",
       "      <td>0</td>\n",
       "      <td>县级市是中国大陆行政区划名称，行政地位与县相同的县级行政区</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>县级市数</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0S0B01</th>\n",
       "      <td>城乡居民社会养老保险参保人数</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>城乡居民社会养老保险参保人数</td>\n",
       "      <td>1</td>\n",
       "      <td>3355</td>\n",
       "      <td></td>\n",
       "      <td>万人</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0S0B02</th>\n",
       "      <td>城乡居民社会养老保险实际领取待遇人数</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>城乡居民社会养老保险实际领取待遇人数</td>\n",
       "      <td>1</td>\n",
       "      <td>3356</td>\n",
       "      <td></td>\n",
       "      <td>万人</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0S0B03</th>\n",
       "      <td>城乡居民社会养老保险基金收入</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>城乡居民社会养老保险基金收入</td>\n",
       "      <td>1</td>\n",
       "      <td>3357</td>\n",
       "      <td></td>\n",
       "      <td>亿元</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0S0B04</th>\n",
       "      <td>城乡居民社会养老保险基金支出</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>城乡居民社会养老保险基金支出</td>\n",
       "      <td>1</td>\n",
       "      <td>3358</td>\n",
       "      <td></td>\n",
       "      <td>亿元</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0S0B05</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>1</td>\n",
       "      <td>3359</td>\n",
       "      <td></td>\n",
       "      <td>亿元</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2943 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                      cname  dotcount  \\\n",
       "code                                    \n",
       "A010101               地级区划数         0   \n",
       "A010102                地级市数         0   \n",
       "A010103               县级区划数         0   \n",
       "A010104                市辖区数         0   \n",
       "A010105                县级市数         0   \n",
       "...                     ...       ...   \n",
       "A0S0B01      城乡居民社会养老保险参保人数         1   \n",
       "A0S0B02  城乡居民社会养老保险实际领取待遇人数         1   \n",
       "A0S0B03      城乡居民社会养老保险基金收入         1   \n",
       "A0S0B04      城乡居民社会养老保险基金支出         1   \n",
       "A0S0B05      城乡居民社会养老保险累计结余         1   \n",
       "\n",
       "                                                       exp  ifshowcode memo  \\\n",
       "code                                                                          \n",
       "A010101      指地级行政单位即介于省级和县级之间的一级地方行政区域的个数，包括地区、自治州、行政区和盟。       False        \n",
       "A010102  市是省、自治区内人口较集中，政治、经济、文化等方面较重要的城市。市人民政府为一级地方行政组织...       False        \n",
       "A010103  县级行政单位指中国地方二级行政区域，是地方政权的基础。县级行政单位包括县、自治县、旗、自治旗...       False        \n",
       "A010104  市辖区（简称区）城市基层政权组织的行政区域。直辖市和较大的市多将市区范围划分为若干区，设立区...       False        \n",
       "A010105                      县级市是中国大陆行政区划名称，行政地位与县相同的县级行政区       False        \n",
       "...                                                    ...         ...  ...   \n",
       "A0S0B01                                                          False        \n",
       "A0S0B02                                                          False        \n",
       "A0S0B03                                                          False        \n",
       "A0S0B04                                                          False        \n",
       "A0S0B05                                                          False        \n",
       "\n",
       "                       name  nodesort  sortcode tag unit  \n",
       "code                                                      \n",
       "A010101               地级区划数         1         2        个  \n",
       "A010102                地级市数         1         3        个  \n",
       "A010103               县级区划数         1         4        个  \n",
       "A010104                市辖区数         1         5        个  \n",
       "A010105                县级市数         1         6        个  \n",
       "...                     ...       ...       ...  ..  ...  \n",
       "A0S0B01      城乡居民社会养老保险参保人数         1      3355       万人  \n",
       "A0S0B02  城乡居民社会养老保险实际领取待遇人数         1      3356       万人  \n",
       "A0S0B03      城乡居民社会养老保险基金收入         1      3357       亿元  \n",
       "A0S0B04      城乡居民社会养老保险基金支出         1      3358       亿元  \n",
       "A0S0B05      城乡居民社会养老保险累计结余         1      3359       亿元  \n",
       "\n",
       "[2943 rows x 10 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# na_values = \"na_rep\" ：因为py识别到na-rep不是数值，所以不能执行数字大小的排列。把这个na-rep转化成NaN（空值），才能进行聚合排序\n",
    "df_raw = pd.read_csv(\"fsnd_zb_data.tsv\",encoding = \"utf8\",sep='\\t',\\\n",
    "                      keep_default_na=False,na_values = \"na_rep\")\n",
    "df_a = pd.read_csv(\"fsnd_zb_meta.tsv\",encoding = \"utf8\",sep='\\t',\\\n",
    "                      keep_default_na=False,na_values = \"na_rep\",index_col = [0] )\n",
    "df_b = pd.read_csv(\"reg_treeId_level2.tsv\",encoding = \"utf8\",sep='\\t',\\\n",
    "                      keep_default_na=False,na_values = \"na_rep\")\n",
    "display(df_a)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 创建指标字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'A010101': '地级区划数',\n",
       " 'A010102': '地级市数',\n",
       " 'A010103': '县级区划数',\n",
       " 'A010104': '市辖区数',\n",
       " 'A010105': '县级市数',\n",
       " 'A010106': '县数',\n",
       " 'A010107': '自治县数',\n",
       " 'A010108': '乡镇级区划数',\n",
       " 'A010109': '镇数',\n",
       " 'A01010A': '乡数',\n",
       " 'A01010B': '街道办事处',\n",
       " 'A010201': '三次产业法人单位数',\n",
       " 'A010202': '分机构类型法人单位数',\n",
       " 'A010203': '分行业法人单位数',\n",
       " 'A010301': '按控股情况分企业法人单位数',\n",
       " 'A010302': '按登记注册类型分企业法人单位数',\n",
       " 'A020101': '地区生产总值',\n",
       " 'A020102': '第一产业增加值',\n",
       " 'A020103': '第二产业增加值',\n",
       " 'A020104': '第三产业增加值',\n",
       " 'A020105': '农林牧渔业增加值',\n",
       " 'A020106': '工业增加值',\n",
       " 'A020107': '建筑业增加值',\n",
       " 'A020108': '批发和零售业增加值',\n",
       " 'A020109': '批发和零售贸易餐饮业增加值',\n",
       " 'A02010A': '交通运输、仓储和邮政业增加值',\n",
       " 'A02010B': '交通运输、仓储和邮电通信业增加值',\n",
       " 'A02010C': '住宿和餐饮业增加值',\n",
       " 'A02010D': '金融业增加值',\n",
       " 'A02010E': '房地产业增加值',\n",
       " 'A02010F': '其他行业增加值',\n",
       " 'A02010G': '人均地区生产总值',\n",
       " 'A020201': '地区生产总值指数(上年=100)',\n",
       " 'A020202': '第一产业增加值指数(上年=100)',\n",
       " 'A020203': '第二产业增加值指数(上年=100)',\n",
       " 'A020204': '第三产业增加值指数(上年=100)',\n",
       " 'A020301': '收入法生产总值',\n",
       " 'A020302': '劳动者报酬',\n",
       " 'A020303': '生产税净额',\n",
       " 'A020304': '固定资产折旧',\n",
       " 'A020305': '营业盈余',\n",
       " 'A020401': '支出法生产总值',\n",
       " 'A020402': '最终消费',\n",
       " 'A020403': '居民消费',\n",
       " 'A020404': '农村居民消费',\n",
       " 'A020405': '城镇居民消费',\n",
       " 'A020406': '政府消费',\n",
       " 'A020407': '资本形成总额',\n",
       " 'A020408': '固定资本形成总额',\n",
       " 'A020409': '存货增加',\n",
       " 'A02040A': '货物和服务净流出',\n",
       " 'A02040B': '最终消费率',\n",
       " 'A02040C': '资本形成率',\n",
       " 'A020501': '居民消费水平',\n",
       " 'A020502': '农村居民消费水平',\n",
       " 'A020503': '城镇居民消费水平',\n",
       " 'A020504': '居民消费水平指数(上年=100)',\n",
       " 'A020505': '农村居民消费水平指数(上年=100)',\n",
       " 'A020506': '城镇居民消费水平指数(上年=100)',\n",
       " 'A030101': '年末常住人口',\n",
       " 'A030102': '城镇人口',\n",
       " 'A030103': '乡村人口',\n",
       " 'A030201': '人口出生率',\n",
       " 'A030202': '人口死亡率',\n",
       " 'A030203': '人口自然增长率',\n",
       " 'A030301': '平均预期寿命',\n",
       " 'A030302': '男性平均预期寿命',\n",
       " 'A030303': '女性平均预期寿命',\n",
       " 'A030801': '人口数(人口抽样调查)',\n",
       " 'A030802': '户数、户人口及户规模(人口抽样调查)',\n",
       " 'A030803': '按户口登记状况分人口数(人口抽样调查)',\n",
       " 'A030804': '人口年龄构成和抚养比(人口抽样调查)',\n",
       " 'A030805': '按婚姻状况分人口数(人口抽样调查)',\n",
       " 'A030806': '按受教育程度分人口数(人口抽样调查)',\n",
       " 'A030807': '15岁及以上文盲人口(人口抽样调查)',\n",
       " 'A030808': '按家庭户规模分的户数(人口抽样调查)',\n",
       " 'A040101': '城镇单位就业人员',\n",
       " 'A040102': '农林牧渔业城镇单位就业人员',\n",
       " 'A040103': '采矿业城镇单位就业人员',\n",
       " 'A040104': '制造业城镇单位就业人员',\n",
       " 'A040105': '电力、燃气及水的生产和供应业城镇单位就业人员',\n",
       " 'A040106': '建筑业城镇单位就业人员',\n",
       " 'A040107': '交通运输、仓储及邮电通信业城镇单位就业人员',\n",
       " 'A040108': '信息传输、计算机服务和软件业城镇单位就业人员',\n",
       " 'A040109': '批发和零售业城镇单位就业人员',\n",
       " 'A04010A': '住宿和餐饮业城镇单位就业人员',\n",
       " 'A04010B': '金融业城镇单位就业人员',\n",
       " 'A04010C': '房地产业城镇单位就业人员',\n",
       " 'A04010D': '租赁和商务服务业城镇单位就业人员',\n",
       " 'A04010E': '科学研究、技术服务和地质勘查业城镇单位就业人员',\n",
       " 'A04010F': '水利、环境和公共设施管理业城镇单位就业人员',\n",
       " 'A04010G': '居民服务和其他服务业城镇单位就业人员',\n",
       " 'A04010H': '教育业城镇单位就业人员',\n",
       " 'A04010I': '卫生、社会保障和社会福利业城镇单位就业人员',\n",
       " 'A04010J': '文化、体育和娱乐业城镇单位就业人员',\n",
       " 'A04010K': '公共管理和社会组织城镇单位就业人员',\n",
       " 'A040201': '私营企业和个体就业人员',\n",
       " 'A040202': '制造业私营企业和个体就业人员',\n",
       " 'A040203': '建筑业私营企业和个体就业人员',\n",
       " 'A040204': '交通运输、仓储和邮政业私营企业和个体就业人员',\n",
       " 'A040205': '批发和零售业私营企业和个体就业人员',\n",
       " 'A040206': '住宿和餐饮业私营企业和个体就业人员',\n",
       " 'A040207': '租赁和商务服务业私营企业和个体就业人员',\n",
       " 'A040208': '居民服务和其他服务业私营企业和个体就业人员',\n",
       " 'A040301': '城镇私营企业和个体就业人员',\n",
       " 'A040302': '制造业城镇私营企业和个体就业人员',\n",
       " 'A040303': '建筑业城镇私营企业和个体就业人员',\n",
       " 'A040304': '交通运输、仓储和邮政业城镇私营企业和个体就业人员',\n",
       " 'A040305': '批发和零售业城镇私营企业和个体就业人员',\n",
       " 'A040306': '住宿和餐饮业城镇私营企业和个体就业人员',\n",
       " 'A040307': '租赁和商务服务业城镇私营企业和个体就业人员',\n",
       " 'A040308': '居民服务和其他服务业城镇私营企业和个体就业人员',\n",
       " 'A040401': '私营企业户数',\n",
       " 'A040402': '私营企业就业人数',\n",
       " 'A040403': '私营企业投资者就业人数',\n",
       " 'A040404': '城镇私营企业就业人数',\n",
       " 'A040405': '城镇私营企业投资者就业人数',\n",
       " 'A040406': '乡村私营企业就业人数',\n",
       " 'A040407': '乡村私营企业投资者就业人数',\n",
       " 'A040501': '个体户数',\n",
       " 'A040502': '个体就业人数',\n",
       " 'A040503': '城镇就业人数',\n",
       " 'A040504': '乡村个体就业人数',\n",
       " 'A040601': '城镇单位就业人员工资总额',\n",
       " 'A040602': '国有城镇单位就业人员工资总额',\n",
       " 'A040603': '城镇集体单位就业人员工资总额',\n",
       " 'A040604': '其他城镇单位就业人员工资总额',\n",
       " 'A040605': '城镇单位就业人员工资总额指数(上年=100)',\n",
       " 'A040606': '国有城镇单位就业人员工资总额指数(上年=100)',\n",
       " 'A040607': '城镇集体单位就业人员工资总额指数(上年=100)',\n",
       " 'A040608': '其他城镇单位就业人员工资总额指数(上年=100)',\n",
       " 'A040701': '城镇单位就业人员平均工资',\n",
       " 'A040702': '城镇单位在岗职工平均工资',\n",
       " 'A040703': '城镇国有单位就业人员平均工资',\n",
       " 'A040704': '城镇集体单位就业人员平均工资',\n",
       " 'A040705': '城镇其他单位就业人员平均工资',\n",
       " 'A040706': '城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A040707': '城镇单位在岗职工平均货币工资指数(上年=100)',\n",
       " 'A040708': '国有城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A040709': '城镇集体单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A04070A': '其他城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A04070B': '城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A04070C': '城镇单位在岗职工平均实际工资指数(上年=100)',\n",
       " 'A04070D': '国有城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A04070E': '城镇集体单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A04070F': '其他城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A040801': '城镇单位就业人员平均工资',\n",
       " 'A040802': '国有单位就业人员平均工资',\n",
       " 'A040803': '城镇集体单位就业人员平均工资',\n",
       " 'A040804': '股份合作单位就业人员平均工资',\n",
       " 'A040805': '联营单位就业人员平均工资',\n",
       " 'A040806': '有限责任公司就业人员平均工资',\n",
       " 'A040807': '股份有限公司就业人员平均工资',\n",
       " 'A040808': '其他单位就业人员平均工资',\n",
       " 'A040809': '港、澳、台商投资单位就业人员平均工资',\n",
       " 'A04080A': '外商投资单位就业人员平均工资',\n",
       " 'A040901': '城镇单位就业人员工资总额',\n",
       " 'A040902': '农、林、牧、渔业城镇单位就业人员工资总额',\n",
       " 'A040903': '采矿业城镇单位就业人员工资总额',\n",
       " 'A040904': '制造业城镇单位就业人员工资总额',\n",
       " 'A040905': '电力、燃气及水的生产和供应业城镇单位就业人员工资总额',\n",
       " 'A040906': '建筑业城镇单位就业人员工资总额',\n",
       " 'A040907': '交通运输、仓储和邮政业城镇单位就业人员工资总额',\n",
       " 'A040908': '信息传输、计算机服务和软件业城镇单位就业人员工资总额',\n",
       " 'A040909': '批发和零售业城镇单位就业人员工资总额',\n",
       " 'A04090A': '住宿和餐饮业城镇单位就业人员工资总额',\n",
       " 'A04090B': '金融业城镇单位就业人员工资总额',\n",
       " 'A04090C': '房地产业城镇单位就业人员工资总额',\n",
       " 'A04090D': '租赁和商务服务业城镇单位就业人员工资总额',\n",
       " 'A04090E': '科学研究、技术服务和地质勘查业城镇单位就业人员工资总额',\n",
       " 'A04090F': '水利、环境和公共设施管理业城镇单位就业人员工资总额',\n",
       " 'A04090G': '居民服务和其他服务业城镇单位就业人员工资总额',\n",
       " 'A04090H': '教育城镇单位就业人员工资总额',\n",
       " 'A04090I': '卫生、社会保障和社会福利业城镇单位就业人员工资总额',\n",
       " 'A04090J': '文化、体育和娱乐业城镇单位就业人员工资总额',\n",
       " 'A04090K': '公共管理和社会组织城镇单位就业人员工资总额',\n",
       " 'A040A01': '城镇单位就业人员平均工资',\n",
       " 'A040A02': '农、林、牧、渔业城镇单位就业人员平均工资',\n",
       " 'A040A03': '采矿业城镇单位就业人员平均工资',\n",
       " 'A040A04': '制造业城镇单位就业人员平均工资',\n",
       " 'A040A05': '电力、燃气及水的生产和供应业城镇单位就业人员平均工资',\n",
       " 'A040A06': '建筑业城镇单位就业人员平均工资',\n",
       " 'A040A07': '交通运输、仓储和邮政业城镇单位就业人员平均工资',\n",
       " 'A040A08': '信息传输、计算机服务和软件业城镇单位就业人员平均工资',\n",
       " 'A040A09': '批发和零售业城镇单位就业人员平均工资',\n",
       " 'A040A0A': '住宿和餐饮业城镇单位就业人员平均工资',\n",
       " 'A040A0B': '金融业城镇单位就业人员平均工资',\n",
       " 'A040A0C': '房地产业城镇单位就业人员平均工资',\n",
       " 'A040A0D': '租赁和商务服务业城镇单位就业人员平均工资',\n",
       " 'A040A0E': '科学研究、技术服务和地质勘查业城镇单位就业人员平均工资',\n",
       " 'A040A0F': '水利、环境和公共设施管理业城镇单位就业人员平均工资',\n",
       " 'A040A0G': '居民服务和其他服务业城镇单位就业人员平均工资',\n",
       " 'A040A0H': '教育城镇单位就业人员平均工资',\n",
       " 'A040A0I': '卫生、社会保障和社会福利业城镇单位就业人员平均工资',\n",
       " 'A040A0J': '文化、体育和娱乐业城镇单位就业人员平均工资',\n",
       " 'A040A0K': '公共管理和社会组织城镇单位就业人员平均工资',\n",
       " 'A040B01': '城镇私营单位就业人员平均工资',\n",
       " 'A040B02': '农、林、牧、渔业城镇私营单位就业人员平均工资',\n",
       " 'A040B03': '采矿业城镇私营单位就业人员平均工资',\n",
       " 'A040B04': '制造业城镇私营单位就业人员平均工资',\n",
       " 'A040B05': '电力、燃气及水的生产和供应业城镇私营单位就业人员平均工资',\n",
       " 'A040B06': '建筑业城镇私营单位就业人员平均工资',\n",
       " 'A040B07': '交通运输、仓储和邮政业城镇私营单位就业人员平均工资',\n",
       " 'A040B08': '信息传输、计算机服务和软件业城镇私营单位就业人员平均工资',\n",
       " 'A040B09': '批发和零售业城镇私营单位就业人员平均工资',\n",
       " 'A040B0A': '住宿和餐饮业城镇私营单位就业人员平均工资',\n",
       " 'A040B0B': '金融业城镇私营单位就业人员平均工资',\n",
       " 'A040B0C': '房地产业城镇私营单位就业人员平均工资',\n",
       " 'A040B0D': '租赁和商务服务业城镇私营单位就业人员平均工资',\n",
       " 'A040B0E': '科学研究、技术服务和地质勘查业城镇私营单位就业人员平均工资',\n",
       " 'A040B0F': '水利、环境和公共设施管理业城镇私营单位就业人员平均工资',\n",
       " 'A040B0G': '居民服务和其他服务业城镇私营单位就业人员平均工资',\n",
       " 'A040B0H': '教育城镇私营单位就业人员平均工资',\n",
       " 'A040B0I': '卫生、社会保障和社会福利业城镇私营单位就业人员平均工资',\n",
       " 'A040B0J': '文化、体育和娱乐业城镇私营单位就业人员平均工资',\n",
       " 'A040B0K': '公共管理和社会组织城镇私营单位就业人员平均工资',\n",
       " 'A040C01': '城镇登记失业人数',\n",
       " 'A040C02': '城镇登记失业率',\n",
       " 'A050101': '全社会固定资产投资',\n",
       " 'A050102': '城镇固定资产投资',\n",
       " 'A050103': '房地产开发投资',\n",
       " 'A050201': '全社会固定资产投资',\n",
       " 'A050202': '内资企业全社会固定资产投资',\n",
       " 'A050203': '国有全社会固定资产投资',\n",
       " 'A050204': '集体全社会固定资产投资',\n",
       " 'A050205': '股份合作全社会固定资产投资',\n",
       " 'A050206': '联营全社会固定资产投资',\n",
       " 'A050207': '有限责任公司全社会固定资产投资',\n",
       " 'A050208': '股份有限公司全社会固定资产投资',\n",
       " 'A050209': '私营全社会固定资产投资',\n",
       " 'A05020A': '个体全社会固定资产投资',\n",
       " 'A05020B': '其他全社会固定资产投资',\n",
       " 'A05020C': '港、澳、台商投资全社会固定资产投资',\n",
       " 'A05020D': '外商投资全社会固定资产投资',\n",
       " 'A050301': '全社会固定资产本年资金来源小计',\n",
       " 'A050302': '全社会固定资产投资中国家预算内资金',\n",
       " 'A050303': '全社会固定资产投资中国内贷款',\n",
       " 'A050304': '全社会固定资产投资中利用外资',\n",
       " 'A050305': '全社会固定资产投资中自筹资金',\n",
       " 'A050306': '全社会固定资产投资中其他资金',\n",
       " 'A050401': '全社会住宅投资',\n",
       " 'A050402': '城镇住宅投资',\n",
       " 'A050403': '房地产住宅投资',\n",
       " 'A050501': '全社会固定资产投资',\n",
       " 'A050502': '农、林、牧、渔业全社会固定资产投资',\n",
       " 'A050503': '采矿业全社会固定资产投资',\n",
       " 'A050504': '制造业全社会固定资产投资',\n",
       " 'A050505': '电力、燃气及水的生产和供应业全社会固定资产投资',\n",
       " 'A050506': '建筑业全社会固定资产投资',\n",
       " 'A050507': '交通运输、仓储和邮政业全社会固定资产投资',\n",
       " 'A050508': '信息传输计算机服务和软件业全社会固定资产投资',\n",
       " 'A050509': '批发和零售业全社会固定资产投资',\n",
       " 'A05050A': '住宿和餐饮业全社会固定资产投资',\n",
       " 'A05050B': '金融业全社会固定资产投资',\n",
       " 'A05050C': '房地产业全社会固定资产投资',\n",
       " 'A05050D': '租赁和商务服务业全社会固定资产投资',\n",
       " 'A05050E': '科学研究、技术服务和地质勘查业全社会固定资产投资',\n",
       " 'A05050F': '水利、环境和公共设施管理业全社会固定资产投资',\n",
       " 'A05050G': '居民服务和其他服务业全社会固定资产投资',\n",
       " 'A05050H': '教育全社会固定资产投资',\n",
       " 'A05050I': '卫生、社会保障和社会福利业全社会固定资产投资',\n",
       " 'A05050J': '文化、体育和娱乐业全社会固定资产投资',\n",
       " 'A05050K': '公共管理和社会组织全社会固定资产投资',\n",
       " 'A05050L': '国际组织全社会固定资产投资',\n",
       " 'A050601': '全社会建设总规模',\n",
       " 'A050602': '全社会在建总规模',\n",
       " 'A050603': '全社会在建净规模',\n",
       " 'A050701': '房屋施工面积',\n",
       " 'A050702': '住宅房屋施工面积',\n",
       " 'A050703': '商品住宅房屋施工面积',\n",
       " 'A050704': '房屋竣工面积',\n",
       " 'A050705': '住宅房屋竣工面积',\n",
       " 'A050706': '商品住宅房屋竣工面积',\n",
       " 'A050707': '房屋竣工价值',\n",
       " 'A050708': '住宅房屋竣工价值',\n",
       " 'A050709': '商品住宅房屋竣工价值',\n",
       " 'A050801': '固定资产投资(不含农户)国家预算内资金',\n",
       " 'A050802': '固定资产投资(不含农户)国内贷款',\n",
       " 'A050803': '固定资产投资(不含农户)利用外资',\n",
       " 'A050804': '固定资产投资(不含农户)自筹资金',\n",
       " 'A050805': '固定资产投资(不含农户)其他资金',\n",
       " 'A050901': '固定资产投资(不含农户)中央项目',\n",
       " 'A050902': '固定资产投资(不含农户)地方项目',\n",
       " 'A050A01': '固定资产投资(不含农户)',\n",
       " 'A050A02': '固定资产投资(不含农户)建筑安装工程',\n",
       " 'A050A03': '固定资产投资(不含农户)设备、工器具购置',\n",
       " 'A050A04': '固定资产投资(不含农户)其他费用',\n",
       " 'A050A05': '新建固定资产投资(不含农户)',\n",
       " 'A050A06': '扩建固定资产投资(不含农户)',\n",
       " 'A050A07': '改建固定资产投资(不含农户)',\n",
       " 'A050B01': '固定资产投资(不含农户)建设总规模',\n",
       " 'A050B02': '固定资产投资(不含农户)在建总规模',\n",
       " 'A050B03': '固定资产投资(不含农户)在建净规模',\n",
       " 'A050C01': '固定资产投资(不含农户)',\n",
       " 'A050C02': '农、林、牧、渔业固定资产投资(不含农户)',\n",
       " 'A050C03': '采矿业固定资产投资(不含农户)',\n",
       " 'A050C04': '制造业固定资产投资(不含农户)',\n",
       " 'A050C05': '电力、燃气及水的生产和供应业固定资产投资(不含农户)',\n",
       " 'A050C06': '建筑业固定资产投资(不含农户)',\n",
       " 'A050C07': '交通运输仓储和邮政业固定资产投资(不含农户)',\n",
       " 'A050C08': '信息传输、计算机服务和软件业固定资产投资(不含农户)',\n",
       " 'A050C09': '批发和零售业固定资产投资(不含农户)',\n",
       " 'A050C0A': '住宿和餐饮业固定资产投资(不含农户)',\n",
       " 'A050C0B': '金融业固定资产投资(不含农户)',\n",
       " 'A050C0C': '房地产业固定资产投资(不含农户)',\n",
       " 'A050C0D': '租赁和商务服务业固定资产投资(不含农户)',\n",
       " 'A050C0E': '科学研究、技术服务和地质勘查业固定资产投资(不含农户)',\n",
       " 'A050C0F': '水利、环境和公共设施管理业固定资产投资(不含农户)',\n",
       " 'A050C0G': '居民服务和其他服务业固定资产投资(不含农户)',\n",
       " 'A050C0H': '教育固定资产投资(不含农户)',\n",
       " 'A050C0I': '卫生、社会保障和社会福利业固定资产投资(不含农户)',\n",
       " 'A050C0J': '文化、体育和娱乐业固定资产投资(不含农户)',\n",
       " 'A050C0K': '公共管理和社会组织固定资产投资(不含农户)',\n",
       " 'A050C0L': '国际组织固定资产投资(不含农户)',\n",
       " 'A050D01': '500万元以下固定资产投资(不含农户)',\n",
       " 'A050D02': '500万元-1亿元固定资产投资(不含农户)',\n",
       " 'A050D03': '1-5亿元固定资产投资(不含农户)',\n",
       " 'A050D04': '5-10亿元固定资产投资(不含农户)',\n",
       " 'A050D05': '10亿元以上固定资产投资(不含农户)',\n",
       " 'A050E01': '能源工业固定资产投资(不含农户)',\n",
       " 'A050E02': '煤炭开采及洗选业固定资产投资(不含农户)',\n",
       " 'A050E03': '石油及天然气开采业固定资产投资(不含农户)',\n",
       " 'A050E04': '石油及炼焦加工业固定资产投资(不含农户)',\n",
       " 'A050E05': '电力、热力及燃气的生产和供应业固定资产投资(不含农户)',\n",
       " 'A050F01': '固定资产投资(不含农户)房屋施工面积',\n",
       " 'A050F02': '固定资产投资(不含农户)住宅施工面积',\n",
       " 'A050F03': '固定资产投资(不含农户)房屋竣工面积',\n",
       " 'A050F04': '固定资产投资(不含农户)住宅竣工面积',\n",
       " 'A050F05': '固定资产投资(不含农户)竣工房屋价值',\n",
       " 'A050F06': '固定资产投资(不含农户)竣工住宅价值',\n",
       " 'A050G01': '新增固定资产投资(不含农户)',\n",
       " 'A050G02': '农、林、牧、渔业新增固定资产投资(不含农户)',\n",
       " 'A050G03': '采掘业新增固定资产投资(不含农户)',\n",
       " 'A050G04': '制造业新增固定资产投资(不含农户)',\n",
       " 'A050G05': '电力、煤气及水的生产和供应业新增固定资产投资(不含农户)',\n",
       " 'A050G06': '建筑业新增固定资产投资(不含农户)',\n",
       " 'A050G07': '交通运输仓储和邮政业新增固定资产投资(不含农户)',\n",
       " 'A050G08': '信息传输、计算机服务和软件业新增固定资产投资(不含农户)',\n",
       " 'A050G09': '批发和零售业新增固定资产投资(不含农户)',\n",
       " 'A050G0A': '住宿和餐饮业新增固定资产投资(不含农户)',\n",
       " 'A050G0B': '金融业新增固定资产投资(不含农户)',\n",
       " 'A050G0C': '房地产业新增固定资产投资(不含农户)',\n",
       " 'A050G0D': '租赁和商务服务业新增固定资产投资(不含农户)',\n",
       " 'A050G0E': '科学研究、技术服务和地质勘查业新增固定资产投资(不含农户)',\n",
       " 'A050G0F': '水利、环境和公共设施管理业新增固定资产投资(不含农户)',\n",
       " 'A050G0G': '居民服务和其他服务业新增固定资产投资(不含农户)',\n",
       " 'A050G0H': '教育新增固定资产投资(不含农户)',\n",
       " 'A050G0I': '卫生、社会保障和社会福利业新增固定资产投资(不含农户)',\n",
       " 'A050G0J': '文化、体育和娱乐业新增固定资产投资(不含农户)',\n",
       " 'A050G0K': '公共管理和社会组织新增固定资产投资(不含农户)',\n",
       " 'A050G0L': '国际组织新增固定资产投资(不含农户)',\n",
       " 'A050H01': '固定资产投资(不含农户)施工项目个数',\n",
       " 'A050H02': '固定资产投资(不含农户)新开工项目个数',\n",
       " 'A050H03': '固定资产投资(不含农户)全部建成投产项目个数',\n",
       " 'A050H04': '固定资产投资(不含农户)项目建成投产率',\n",
       " 'A050I01': '固定资产投资(不含农户)',\n",
       " 'A050I02': '固定资产投资(不含农户)新增固定资产',\n",
       " 'A050I03': '固定资产投资(不含农户)交付使用率',\n",
       " 'A050J01': '农村农户固定资产投资额',\n",
       " 'A050J02': '农村农户竣工房屋投资额',\n",
       " 'A050J03': '农村农户竣工住宅投资额',\n",
       " 'A050J04': '农村农户施工房屋建筑面积',\n",
       " 'A050J05': '农村农户竣工房屋建筑面积',\n",
       " 'A050J06': '农村农户竣工住宅建筑面积',\n",
       " 'A050J07': '农村农户竣工房屋造价',\n",
       " 'A050J08': '农村农户竣工住宅造价',\n",
       " 'A051C01': '房地产开发企业个数',\n",
       " 'A051C02': '内资房地产开发企业个数',\n",
       " 'A051C03': '国有房地产开发企业个数',\n",
       " 'A051C04': '集体房地产开发企业个数',\n",
       " 'A051C05': '港、澳、台投资房地产开发企业个数',\n",
       " 'A051C06': '外商投资房地产开发企业个数',\n",
       " 'A051D01': '房地产开发企业平均从业人数',\n",
       " 'A051D02': '内资房地产开发企业平均从业人数',\n",
       " 'A051D03': '国有房地产开发企业平均从业人数',\n",
       " 'A051D04': '集体房地产开发企业平均从业人数',\n",
       " 'A051D05': '港、澳、台投资房地产开发企业平均从业人数',\n",
       " 'A051D06': '外商投资房地产开发企业平均从业人数',\n",
       " 'A051E01': '房地产开发企业待开发土地面积',\n",
       " 'A051E02': '房地产开发企业购置土地面积',\n",
       " 'A051E03': '房地产开发企业土地成交价款',\n",
       " 'A051E04': '房地产开发企业土地购置费用',\n",
       " 'A051F01': '房地产开发企业计划总投资',\n",
       " 'A051F02': '房地产开发企业自开始建设至本年底累计完成投资',\n",
       " 'A051F03': '房地产开发企业本年完成投资额',\n",
       " 'A051F04': '房地产开发企业建筑安装工程本年完成投资额',\n",
       " 'A051F05': '房地产开发企业设备工器具购置本年完成投资额',\n",
       " 'A051F06': '房地产开发企业其他费用本年完成投资额',\n",
       " 'A051G01': '房地产开发投资额',\n",
       " 'A051G02': '房地产开发住宅投资额',\n",
       " 'A051G03': '房地产开发别墅、高档公寓投资额',\n",
       " 'A051G04': '房地产开发办公楼投资额',\n",
       " 'A051G05': '房地产开发商业营业用房投资额',\n",
       " 'A051G06': '房地产开发其他投资额',\n",
       " 'A051H01': '房地产开发企业本年实际到位资金',\n",
       " 'A051H02': '房地产开发企业国内贷款',\n",
       " 'A051H03': '房地产开发企业利用外资',\n",
       " 'A051H04': '房地产开发企业外商直接投资',\n",
       " 'A051H05': '房地产开发企业自筹资金',\n",
       " 'A051H06': '房地产开发企业其他资金来源',\n",
       " 'A051H07': '房地产开发企业定金及预收款',\n",
       " 'A051H08': '房地产开发企业个人按揭贷款',\n",
       " 'A051H09': '房地产开发企业其他到位资金',\n",
       " 'A051I01': '房地产开发企业施工房屋面积',\n",
       " 'A051I02': '房地产开发企业竣工房屋面积',\n",
       " 'A051I03': '房地产开发企业房屋建筑面积竣工率',\n",
       " 'A051I04': '房地产开发企业竣工房屋价值',\n",
       " 'A051I05': '房地产开发企业竣工房屋造价',\n",
       " 'A051J01': '房地产开发企业新开工房屋面积',\n",
       " 'A051J02': '房地产开发企业住宅新开工房屋面积',\n",
       " 'A051J03': '房地产开发企业别墅、高档公寓新开工房屋面积',\n",
       " 'A051J04': '房地产开发企业办公楼新开工房屋面积',\n",
       " 'A051J05': '房地产开发企业商业营业用房新开工房屋面积',\n",
       " 'A051J06': '房地产开发企业其他用途新开工房屋面积',\n",
       " 'A051K01': '商品房销售面积',\n",
       " 'A051K02': '住宅商品房销售面积',\n",
       " 'A051K03': '别墅、高档公寓销售面积',\n",
       " 'A051K04': '办公楼商品房销售面积',\n",
       " 'A051K05': '商业营业用房销售面积',\n",
       " 'A051K06': '其他商品房销售面积',\n",
       " 'A051L01': '商品房销售额',\n",
       " 'A051L02': '住宅商品房销售额',\n",
       " 'A051L03': '别墅、高档公寓销售额',\n",
       " 'A051L04': '办公楼销售额',\n",
       " 'A051L05': '商业营业用房销售额',\n",
       " 'A051L06': '其他商品房销售额',\n",
       " 'A051M01': '商品房平均销售价格',\n",
       " 'A051M02': '住宅商品房平均销售价格',\n",
       " 'A051M03': '别墅、高档公寓平均销售价格',\n",
       " 'A051M04': '办公楼商品房平均销售价格',\n",
       " 'A051M05': '商业营业用房平均销售价格',\n",
       " 'A051M06': '其他商品房平均销售价格',\n",
       " 'A051N01': '房地产开发企业实收资本',\n",
       " 'A051N02': '房地产开发企业资产总计',\n",
       " 'A051N03': '房地产开发企业累计折旧',\n",
       " 'A051N04': '房地产开发企业本年折旧',\n",
       " 'A051N05': '房地产开发企业负债合计',\n",
       " 'A051N06': '房地产开发企业所有者权益',\n",
       " 'A051N07': '房地产开发企业资产负债率',\n",
       " 'A051O01': '房地产开发企业主营业务收入',\n",
       " 'A051O02': '房地产开发企业土地转让收入',\n",
       " 'A051O03': '房地产开发企业商品房销售收入',\n",
       " 'A051O04': '房地产开发企业房屋出租收入',\n",
       " 'A051O05': '房地产开发企业其他收入',\n",
       " 'A051O06': '房地产开发企业主营业务税金及附加',\n",
       " 'A051O07': '房地产开发企业营业利润',\n",
       " 'A051P01': '500万元以下房地产开发投资额',\n",
       " 'A051P02': '500-1000万元房地产开发投资额',\n",
       " 'A051P03': '1000-3000万元房地产开发投资额',\n",
       " 'A051P04': '3000-5000万元房地产开发投资额',\n",
       " 'A051P05': '5000万-1亿元房地产开发投资额',\n",
       " 'A051P06': '1-5亿元房地产开发投资额',\n",
       " 'A051P07': '5-10亿元房地产开发投资额',\n",
       " 'A051P08': '10亿元以上房地产开发投资额',\n",
       " 'A051Q01': '房地产开发企业住宅竣工套数',\n",
       " 'A051Q02': '房地产开发企业别墅、高档公寓竣工套数',\n",
       " 'A051Q03': '房地产开发企业住宅销售套数',\n",
       " 'A051Q04': '房地产开发企业别墅、高档公寓销售套数',\n",
       " 'A060101': '经营单位所在地进出口总额',\n",
       " 'A060102': '经营单位所在地出口总额',\n",
       " 'A060103': '经营单位所在地进口总额',\n",
       " 'A060201': '境内目的地和货源地进出口总额',\n",
       " 'A060202': '境内目的地和货源地出口总额',\n",
       " 'A060203': '境内目的地和货源地进口总额',\n",
       " 'A060301': '外商投资企业进出口总额',\n",
       " 'A060302': '外商投资企业出口总额',\n",
       " 'A060303': '外商投资企业进口总额',\n",
       " 'A060401': '外商投资企业数',\n",
       " 'A060402': '外商投资企业投资总额',\n",
       " 'A060403': '外商投资企业注册资本',\n",
       " 'A060404': '外方外商投资企业注册资本',\n",
       " 'A070101': '国有经济能源工业固定资产投资',\n",
       " 'A070102': '国有经济煤炭采选业固定资产投资',\n",
       " 'A070103': '国有经济石油和天然气开采业固定资产投资',\n",
       " 'A070104': '国有经济电力、蒸汽、热水生产和供应业固定资产投资',\n",
       " 'A070105': '国有经济石油加工及炼焦业固定资产投资',\n",
       " 'A070106': '国有经济煤气生产和供应业固定资产投资',\n",
       " 'A070201': '能源工业投资',\n",
       " 'A070202': '煤炭采选业投资',\n",
       " 'A070203': '石油和天然气开采业投资',\n",
       " 'A070204': '电力、蒸汽、热水生产和供应业投资',\n",
       " 'A070205': '石油加工及炼焦业投资',\n",
       " 'A070206': '煤气生产和供应业投资',\n",
       " 'A070301': '焦炭生产量',\n",
       " 'A070302': '原油生产量',\n",
       " 'A070303': '汽油生产量',\n",
       " 'A070304': '煤油生产量',\n",
       " 'A070305': '柴油生产量',\n",
       " 'A070306': '燃料油生产量',\n",
       " 'A070307': '天然气生产量',\n",
       " 'A070308': '发电量',\n",
       " 'A070309': '水力发电量',\n",
       " 'A07030A': '火力发电量',\n",
       " 'A070401': '城市天然气供气总量',\n",
       " 'A070402': '城市天然气用气人口',\n",
       " 'A070403': '城市人工煤气供气总量',\n",
       " 'A070404': '城市人工煤气用气人口',\n",
       " 'A070405': '城市液化石油气供气总量',\n",
       " 'A070406': '城市液化石油气用气人口',\n",
       " 'A070501': '蒸汽供热能力',\n",
       " 'A070502': '热水供热能力',\n",
       " 'A070601': '煤炭消费量',\n",
       " 'A070602': '焦炭消费量',\n",
       " 'A070603': '原油消费量',\n",
       " 'A070604': '汽油消费量',\n",
       " 'A070605': '煤油消费量',\n",
       " 'A070606': '柴油消费量',\n",
       " 'A070607': '燃料油消费量',\n",
       " 'A070608': '天然气消费量',\n",
       " 'A070609': '电力消费量',\n",
       " 'A070701': '单位地区生产总值能耗(等价值)',\n",
       " 'A070702': '单位地区生产总值能耗(等价值)_同比增长',\n",
       " 'A070703': '单位工业增加值能耗(规模以上当量值)',\n",
       " 'A070704': '单位工业增加值能耗(规模以上当量值)_同比增长',\n",
       " 'A070705': '单位地区生产总值电耗(等价值)',\n",
       " 'A070706': '单位地区生产总值电耗(等价值)_同比增长',\n",
       " 'A080101': '地方财政一般预算收入',\n",
       " 'A080102': '地方财政税收收入',\n",
       " 'A080103': '地方财政国内增值税',\n",
       " 'A080104': '地方财政营业税',\n",
       " 'A080105': '地方财政企业所得税',\n",
       " 'A080106': '地方财政个人所得税',\n",
       " 'A080107': '地方财政资源税',\n",
       " 'A080108': '地方财政固定资产投资方向调节税',\n",
       " 'A080109': '地方财政城市维护建设税',\n",
       " 'A08010A': '地方财政房产税',\n",
       " 'A08010B': '地方财政印花税',\n",
       " 'A08010C': '地方财政城镇土地使用税',\n",
       " 'A08010D': '地方财政土地增值税',\n",
       " 'A08010E': '地方财政车船税',\n",
       " 'A08010F': '地方财政耕地占用税',\n",
       " 'A08010G': '地方财政契税',\n",
       " 'A08010H': '地方财政烟叶税',\n",
       " 'A08010I': '地方财政其他税收收入',\n",
       " 'A08010J': '地方财政非税收入',\n",
       " 'A08010K': '地方财政专项收入',\n",
       " 'A08010L': '地方财政行政事业性收费收入',\n",
       " 'A08010M': '地方财政罚没收入',\n",
       " 'A08010N': '地方财政国有资本经营收入',\n",
       " 'A08010O': '地方财政国有资源(资产)有偿使用收入',\n",
       " 'A08010P': '地方财政其他非税收入',\n",
       " 'A080201': '地方财政一般预算支出',\n",
       " 'A080202': '地方财政一般公共服务支出',\n",
       " 'A080203': '地方财政外交支出',\n",
       " 'A080204': '地方财政国防支出',\n",
       " 'A080205': '地方财政公共安全支出',\n",
       " 'A080206': '地方财政教育支出',\n",
       " 'A080207': '地方财政科学技术支出',\n",
       " 'A080208': '地方财政文化体育与传媒支出',\n",
       " 'A080209': '地方财政社会保障和就业支出',\n",
       " 'A08020A': '地方财政医疗卫生支出',\n",
       " 'A08020B': '地方财政环境保护支出',\n",
       " 'A08020C': '地方财政城乡社区事务支出',\n",
       " 'A08020D': '地方财政农林水事务支出',\n",
       " 'A08020E': '地方财政交通运输支出',\n",
       " 'A08020F': '地方财政资源勘探电力信息等事务支出',\n",
       " 'A08020G': '地方财政商业服务业等事务支出',\n",
       " 'A08020H': '地方财政金融监管支出',\n",
       " 'A08020I': '地方财政地震灾后重建支出',\n",
       " 'A08020J': '地方财政国土资源气象等事务支出决策数',\n",
       " 'A08020K': '地方财政住房保障支出支出',\n",
       " 'A08020L': '地方财政粮油物资储备管理等事务',\n",
       " 'A08020M': '地方财政国债还本付息支出',\n",
       " 'A08020N': '地方财政其他支出',\n",
       " 'A090101': '居民消费价格指数(上年=100)',\n",
       " 'A090102': '城市居民消费价格指数(上年=100)',\n",
       " 'A090103': '农村居民消费价格指数(上年=100)',\n",
       " 'A090104': '商品零售价格指数(上年=100)',\n",
       " 'A090105': '城市商品零售价格指数(上年=100)',\n",
       " 'A090106': '农村商品零售价格指数(上年=100)',\n",
       " 'A090201': '居民消费价格指数(上年=100)',\n",
       " 'A090202': '食品类居民消费价格指数(上年=100)',\n",
       " 'A090203': '粮食类居民消费价格指数(上年=100)',\n",
       " 'A090204': '油脂类居民消费价格指数(上年=100)',\n",
       " 'A090205': '肉禽及其制品类居民消费价格指数(上年=100)',\n",
       " 'A090206': '蛋类居民消费价格指数(上年=100)',\n",
       " 'A090207': '水产品类居民消费价格指数(上年=100)',\n",
       " 'A090208': '菜类居民消费价格指数(上年=100)',\n",
       " 'A090209': '鲜菜类居民消费价格指数(上年=100)',\n",
       " 'A09020A': '干鲜瓜果类居民消费价格指数(上年=100)',\n",
       " 'A09020B': '鲜果类居民消费价格指数(上年=100)',\n",
       " 'A09020C': '在外用膳食品类居民消费价格指数(上年=100)',\n",
       " 'A09020D': '烟酒及用品类居民消费价格指数(上年=100)',\n",
       " 'A09020E': '烟草类居民消费价格指数(上年=100)',\n",
       " 'A09020F': '酒类居民消费价格指数(上年=100)',\n",
       " 'A09020G': '衣着类居民消费价格指数(上年=100)',\n",
       " 'A09020H': '服装类居民消费价格指数(上年=100)',\n",
       " 'A09020I': '衣着材料类居民消费价格指数(上年=100)',\n",
       " 'A09020J': '鞋袜帽类居民消费价格指数(上年=100)',\n",
       " 'A09020K': '衣着加工服务费类居民消费价格指数(上年=100)',\n",
       " 'A09020L': '家庭设备用品及服务类居民消费价格指数(上年=100)',\n",
       " 'A09020M': '耐用消费品类居民消费价格指数(上年=100)',\n",
       " 'A09020N': '室内装饰品类居民消费价格指数(上年=100)',\n",
       " 'A09020O': '床上用品类居民消费价格指数(上年=100)',\n",
       " 'A09020P': '家庭日用杂品类居民消费价格指数(上年=100)',\n",
       " 'A09020Q': '家庭服务及加工维修服务费类居民消费价格指数(上年=100)',\n",
       " 'A09020R': '医疗保健和个人用品类居民消费价格指数(上年=100)',\n",
       " 'A09020S': '医疗保健类居民消费价格指数(上年=100)',\n",
       " 'A09020T': '医疗器具及用品类居民消费价格指数(上年=100)',\n",
       " 'A09020U': '中药材及中成药类居民消费价格指数(上年=100)',\n",
       " 'A09020V': '西药类居民消费价格指数(上年=100)',\n",
       " 'A09020W': '保健器具及用品类居民消费价格指数(上年=100)',\n",
       " 'A09020X': '医疗保健服务类居民消费价格指数(上年=100)',\n",
       " 'A09020Y': '个人用品及服务类居民消费价格指数(上年=100)',\n",
       " 'A09020Z': '化妆美容用品类居民消费价格指数(上年=100)',\n",
       " 'A090210': '卫生用品类居民消费价格指数(上年=100)',\n",
       " 'A090211': '个人饰品类居民消费价格指数(上年=100)',\n",
       " 'A090212': '个人服务类居民消费价格指数(上年=100)',\n",
       " 'A090213': '交通和通信类居民消费价格指数(上年=100)',\n",
       " 'A090214': '交通类居民消费价格指数(上年=100)',\n",
       " 'A090215': '交通工具类居民消费价格指数(上年=100)',\n",
       " 'A090216': '车用燃料及零配件类居民消费价格指数(上年=100)',\n",
       " 'A090217': '车辆使用及维修费类居民消费价格指数(上年=100)',\n",
       " 'A090218': '市内公共交通费类居民消费价格指数(上年=100)',\n",
       " 'A090219': '城市间交通费类居民消费价格指数(上年=100)',\n",
       " 'A09021A': '通信类居民消费价格指数(上年=100)',\n",
       " 'A09021B': '通信工具类居民消费价格指数(上年=100)',\n",
       " 'A09021C': '通信服务类居民消费价格指数(上年=100)',\n",
       " 'A09021D': '娱乐教育文化类居民消费价格指数(上年=100)',\n",
       " 'A09021E': '文娱用耐用消费品及服务类居民消费价格指数(上年=100)',\n",
       " 'A09021F': '教育类居民消费价格指数(上年=100)',\n",
       " 'A09021G': '教材及参考书类居民消费价格指数(上年=100)',\n",
       " 'A09021H': '学杂托幼费类居民消费价格指数(上年=100)',\n",
       " 'A09021I': '文化娱乐类居民消费价格指数(上年=100)',\n",
       " 'A09021J': '文化娱乐用品类居民消费价格指数(上年=100)',\n",
       " 'A09021K': '书报杂志类居民消费价格指数(上年=100)',\n",
       " 'A09021L': '文娱费类居民消费价格指数(上年=100)',\n",
       " 'A09021M': '旅游类居民消费价格指数(上年=100)',\n",
       " 'A09021N': '居住类居民消费价格指数(上年=100)',\n",
       " 'A09021O': '建房及装修材料类居民消费价格指数(上年=100)',\n",
       " 'A09021P': '租房类居民消费价格指数(上年=100)',\n",
       " 'A09021Q': '自有住房类居民消费价格指数(上年=100)',\n",
       " 'A09021R': '水电燃料类居民消费价格指数(上年=100)',\n",
       " 'A090301': '农村居民消费价格指数(上年=100)',\n",
       " 'A090302': '食品类农村居民消费价格指数(上年=100)',\n",
       " 'A090303': '粮食类农村居民消费价格指数(上年=100)',\n",
       " 'A090304': '淀粉及制品类农村居民消费价格指数(上年=100)',\n",
       " 'A090305': '干豆类及豆制品类农村居民消费价格指数(上年=100)',\n",
       " 'A090306': '油脂类农村居民消费价格指数(上年=100)',\n",
       " 'A090307': '肉禽及其制品类农村居民消费价格指数(上年=100)',\n",
       " 'A090308': '食用畜肉及副产品类农村居民消费价格指数(上年=100)',\n",
       " 'A090309': '禽类农村居民消费价格指数(上年=100)',\n",
       " 'A09030A': '加工肉禽类农村居民消费价格指数(上年=100)',\n",
       " 'A09030B': '蛋类农村居民消费价格指数(上年=100)',\n",
       " 'A09030C': '水产品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030D': '鱼类农村居民消费价格指数(上年=100)',\n",
       " 'A09030E': '其他水产品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030F': '菜类农村居民消费价格指数(上年=100)',\n",
       " 'A09030G': '调味品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030H': '糖类农村居民消费价格指数(上年=100)',\n",
       " 'A09030I': '茶及饮料类农村居民消费价格指数(上年=100)',\n",
       " 'A09030J': '茶叶类农村居民消费价格指数(上年=100)',\n",
       " 'A09030K': '饮料类农村居民消费价格指数(上年=100)',\n",
       " 'A09030L': '干鲜瓜果类农村居民消费价格指数(上年=100)',\n",
       " 'A09030M': '糕点饼干类农村居民消费价格指数(上年=100)',\n",
       " 'A09030N': '液体乳及乳制品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030O': '在外用膳食品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030P': '其他食品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030Q': '烟酒及饮料类农村居民消费价格指数(上年=100)',\n",
       " 'A09030R': '烟草类农村居民消费价格指数(上年=100)',\n",
       " 'A09030S': '酒类农村居民消费价格指数(上年=100)',\n",
       " 'A09030U': '衣着类农村居民消费价格指数(上年=100)',\n",
       " 'A09030V': '服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030W': '男式服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030X': '女式服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030Y': '儿童服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030Z': '衣着材料类农村居民消费价格指数(上年=100)',\n",
       " 'A090310': '鞋袜帽类农村居民消费价格指数(上年=100)',\n",
       " 'A090311': '鞋类农村居民消费价格指数(上年=100)',\n",
       " 'A090312': '袜子类农村居民消费价格指数(上年=100)',\n",
       " 'A090313': '帽子类农村居民消费价格指数(上年=100)',\n",
       " 'A090314': '衣着加工服务费类农村居民消费价格指数(上年=100)',\n",
       " 'A090315': '家庭设备用品及维修服务类农村居民消费价格指数(上年=100)',\n",
       " 'A090316': '耐用消费品类农村居民消费价格指数(上年=100)',\n",
       " 'A090317': '家具类农村居民消费价格指数(上年=100)',\n",
       " 'A090318': '家庭设备类农村居民消费价格指数(上年=100)',\n",
       " 'A090319': '室内装饰品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031A': '床上用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031B': '家庭日用杂品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031C': '家庭服务及加工维修服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031D': '医疗保健和个人用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031E': '医疗保健类农村居民消费价格指数(上年=100)',\n",
       " 'A09031F': '医疗器具及用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031G': '中药材及中成药类农村居民消费价格指数(上年=100)',\n",
       " 'A09031H': '西药类农村居民消费价格指数(上年=100)',\n",
       " 'A09031I': '保健器具及用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031J': '医疗保健服务费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031K': '个人用品及服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031L': '化妆美容用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031M': '清洁化妆用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031N': '个人饰品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031O': '个人服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031P': '交通和通信类农村居民消费价格指数(上年=100)',\n",
       " 'A09031Q': '交通类农村居民消费价格指数(上年=100)',\n",
       " 'A09031R': '交通工具类农村居民消费价格指数(上年=100)',\n",
       " 'A09031S': '车用燃料及零配件类农村居民消费价格指数(上年=100)',\n",
       " 'A09031T': '车辆使用及维修费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031U': '市内公共交通费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031V': '城市间交通费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031W': '通信类农村居民消费价格指数(上年=100)',\n",
       " 'A09031X': '通信工具类农村居民消费价格指数(上年=100)',\n",
       " 'A09031Y': '通信服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031Z': '娱乐教育文化用品及服务类农村居民消费价格指数(上年=100)',\n",
       " 'A090320': '文娱用耐用消费品及服务类农村居民消费价格指数(上年=100)',\n",
       " 'A090321': '教育类农村居民消费价格指数(上年=100)',\n",
       " 'A090322': '教材及参考书类农村居民消费价格指数(上年=100)',\n",
       " 'A090323': '学杂托幼费类农村居民消费价格指数(上年=100)',\n",
       " 'A090324': '文化娱乐类农村居民消费价格指数(上年=100)',\n",
       " 'A090325': '文化娱乐用品类农村居民消费价格指数(上年=100)',\n",
       " 'A090326': '书报杂志类农村居民消费价格指数(上年=100)',\n",
       " 'A090327': '文娱费类农村居民消费价格指数(上年=100)',\n",
       " 'A090328': '旅游类农村居民消费价格指数(上年=100)',\n",
       " 'A090329': '居住类农村居民消费价格指数(上年=100)',\n",
       " 'A09032A': '建房及装修材料类农村居民消费价格指数(上年=100)',\n",
       " 'A09032B': '租房类农村居民消费价格指数(上年=100)',\n",
       " 'A09032C': '自有住房类农村居民消费价格指数(上年=100)',\n",
       " 'A09032D': '水电燃料类农村居民消费价格指数(上年=100)',\n",
       " 'A090401': '商品零售价格指数(上年=100)',\n",
       " 'A090402': '食品类商品零售价格指数(上年=100)',\n",
       " 'A090403': '粮食类商品零售价格指数(上年=100)',\n",
       " 'A090404': '油脂类商品零售价格指数(上年=100)',\n",
       " 'A090405': '肉禽及其制品类商品零售价格指数(上年=100)',\n",
       " 'A090406': '蛋类商品零售价格指数(上年=100)',\n",
       " 'A090407': '水产品类商品零售价格指数(上年=100)',\n",
       " 'A090408': '菜类商品零售价格指数(上年=100)',\n",
       " 'A090409': '干鲜瓜果类商品零售价格指数(上年=100)',\n",
       " 'A09040A': '饮料烟酒类商品零售价格指数(上年=100)',\n",
       " 'A09040B': '服装鞋帽类商品零售价格指数(上年=100)',\n",
       " 'A09040C': '纺织品类商品零售价格指数(上年=100)',\n",
       " 'A09040D': '家用电器及音像器材类商品零售价格指数(上年=100)',\n",
       " 'A09040E': '文化办公用品类商品零售价格指数(上年=100)',\n",
       " 'A09040F': '日用品类商品零售价格指数(上年=100)',\n",
       " 'A09040G': '体育娱乐用品类商品零售价格指数(上年=100)',\n",
       " 'A09040H': '交通、通信用品类商品零售价格指数(上年=100)',\n",
       " 'A09040I': '家具类商品零售价格指数(上年=100)',\n",
       " 'A09040J': '化妆品类商品零售价格指数(上年=100)',\n",
       " 'A09040K': '金银珠宝类商品零售价格指数(上年=100)',\n",
       " 'A09040L': '中西药品及医疗保健用品类商品零售价格指数(上年=100)',\n",
       " 'A09040M': '书报杂志及电子出版物类商品零售价格指数(上年=100)',\n",
       " 'A09040N': '燃料类商品零售价格指数(上年=100)',\n",
       " 'A09040O': '建筑材料及五金电料类商品零售价格指数(上年=100)',\n",
       " 'A090501': '农村商品零售价格指数(上年=100)',\n",
       " 'A090502': '食品类农村商品零售价格指数(上年=100)',\n",
       " 'A090503': '粮食类农村商品零售价格指数(上年=100)',\n",
       " 'A090504': '淀粉类农村商品零售价格指数(上年=100)',\n",
       " 'A090505': '干豆类及豆制品类农村商品零售价格指数(上年=100)',\n",
       " 'A090506': '油脂类农村商品零售价格指数(上年=100)',\n",
       " 'A090507': '肉禽及其制品类农村商品零售价格指数(上年=100)',\n",
       " 'A090508': '蛋类农村商品零售价格指数(上年=100)',\n",
       " 'A090509': '水产品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050A': '菜类农村商品零售价格指数(上年=100)',\n",
       " 'A09050B': '调味品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050C': '糖类农村商品零售价格指数(上年=100)',\n",
       " 'A09050D': '干鲜瓜果类农村商品零售价格指数(上年=100)',\n",
       " 'A09050E': '糕点饼干面包类农村商品零售价格指数(上年=100)',\n",
       " 'A09050F': '液体乳及乳制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050G': '在外用膳食品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050H': '其他食品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050I': '饮料、烟酒类农村商品零售价格指数(上年=100)',\n",
       " 'A09050J': '茶及饮料类农村商品零售价格指数(上年=100)',\n",
       " 'A09050K': '烟草类农村商品零售价格指数(上年=100)',\n",
       " 'A09050L': '酒类农村商品零售价格指数(上年=100)',\n",
       " 'A09050M': '服装、鞋帽类农村商品零售价格指数(上年=100)',\n",
       " 'A09050N': '服装类农村商品零售价格指数(上年=100)',\n",
       " 'A09050O': '鞋袜帽类农村商品零售价格指数(上年=100)',\n",
       " 'A09050P': '其他类农村商品零售价格指数(上年=100)',\n",
       " 'A09050Q': '纺织品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050R': '衣着材料类农村商品零售价格指数(上年=100)',\n",
       " 'A09050S': '床上用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050T': '家用电器及音像器材类农村商品零售价格指数(上年=100)',\n",
       " 'A09050U': '家庭设备类农村商品零售价格指数(上年=100)',\n",
       " 'A09050V': '文娱用耐用消费品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050W': '音像器材类农村商品零售价格指数(上年=100)',\n",
       " 'A09050X': '文化办公用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050Y': '日用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050Z': '日用百货类农村商品零售价格指数(上年=100)',\n",
       " 'A090510': '日用杂品类农村商品零售价格指数(上年=100)',\n",
       " 'A090511': '洗涤用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090512': '其他日用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090513': '体育娱乐用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090514': '体育用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090515': '娱乐用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090516': '交通、通信用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090517': '交通运输机械类农村商品零售价格指数(上年=100)',\n",
       " 'A090518': '通讯器材类农村商品零售价格指数(上年=100)',\n",
       " 'A090519': '家具类农村商品零售价格指数(上年=100)',\n",
       " 'A09051A': '化妆品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051B': '金银珠宝类农村商品零售价格指数(上年=100)',\n",
       " 'A09051C': '中西药品及医疗保健用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051D': '医疗器具及用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051E': '中药材及中成药类农村商品零售价格指数(上年=100)',\n",
       " 'A09051F': '西药类农村商品零售价格指数(上年=100)',\n",
       " 'A09051G': '保健器具及用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051H': '书报杂志及电子出版物类农村商品零售价格指数(上年=100)',\n",
       " 'A09051I': '教材及参考书类农村商品零售价格指数(上年=100)',\n",
       " 'A09051J': '书报杂志类农村商品零售价格指数(上年=100)',\n",
       " 'A09051K': '电子音像制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051L': '燃料类农村商品零售价格指数(上年=100)',\n",
       " 'A09051M': '煤炭及制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051N': '石油及制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051O': '建筑材料及五金电料类农村商品零售价格指数(上年=100)',\n",
       " 'A09051P': '建筑装璜材料类农村商品零售价格指数(上年=100)',\n",
       " 'A09051Q': '五金电料类农村商品零售价格指数(上年=100)',\n",
       " 'A090601': '农业生产资料指数(上年=100)',\n",
       " 'A090602': '农用手工工具指数(上年=100)',\n",
       " 'A090603': '饲料价格指数(上年=100)',\n",
       " 'A090604': '产品畜价格指数(上年=100)',\n",
       " 'A090605': '半机械化农具生产资料价格指数(上年=100)',\n",
       " 'A090606': '机械化农具生产资料价格指数(上年=100)',\n",
       " 'A090607': '化学肥料生产资料价格指数(上年=100)',\n",
       " 'A090608': '农药及农药械生产资料价格指数(上年=100)',\n",
       " 'A090609': '化学农药生产资料价格指数(上年=100)',\n",
       " 'A09060A': '农药器械生产资料价格指数(上年=100)',\n",
       " 'A09060B': '农用机油生产资料价格指数(上年=100)',\n",
       " 'A09060C': '其他农业生产资料价格指数(上年=100)',\n",
       " 'A09060D': '农用种子生产资料价格指数(上年=100)',\n",
       " 'A09060E': '其他农业生产资料(除种子)价格指数(上年=100)',\n",
       " 'A09060F': '农业生产服务价格指数(上年=100)',\n",
       " 'A090701': '农产品生产价格指数(上年=100)',\n",
       " 'A090702': '种植业生产价格指数(上年价格=100)',\n",
       " 'A090703': '谷物生产价格指数(上年价格=100)',\n",
       " 'A090704': '小麦生产价格指数(上年价格=100)',\n",
       " 'A090705': '稻谷生产价格指数(上年价格=100)',\n",
       " 'A090706': '玉米生产价格指数(上年价格=100)',\n",
       " 'A090707': '豆类生产价格指数(上年价格=100)',\n",
       " 'A090708': '大豆生产价格指数(上年价格=100)',\n",
       " 'A090709': '薯类生产价格指数(上年价格=100)',\n",
       " 'A09070A': '油料生产价格指数(上年价格=100)',\n",
       " 'A09070B': '花生生产价格指数(上年价格=100)',\n",
       " 'A09070C': '油菜籽生产价格指数(上年价格=100)',\n",
       " 'A09070D': '棉花生产价格指数(上年价格=100)',\n",
       " 'A09070E': '糖料生产价格指数(上年价格=100)',\n",
       " 'A09070F': '麻类生产价格指数(上年价格=100)',\n",
       " 'A09070G': '烟叶生产价格指数(上年价格=100)',\n",
       " 'A09070H': '蔬菜生产价格指数(上年价格=100)',\n",
       " 'A09070I': '水果生产价格指数(上年价格=100)',\n",
       " 'A09070J': '茶叶生产价格指数(上年价格=100)',\n",
       " 'A09070K': '林产品生产价格指数(上年价格=100)',\n",
       " 'A09070L': '畜产品生产价格指数(上年价格=100)',\n",
       " 'A09070M': '猪生产价格指数(上年价格=100)',\n",
       " 'A09070N': '家禽生产价格指数(上年价格=100)',\n",
       " 'A09070O': '蛋类生产价格指数(上年价格=100)',\n",
       " 'A09070P': '奶类生产价格指数(上年价格=100)',\n",
       " 'A09070Q': '渔业产品生产价格指数(上年价格=100)',\n",
       " 'A09070R': '海水养殖产品生产价格指数(上年=100)',\n",
       " 'A09070S': '海水捕捞产品生产价格指数(上年=100)',\n",
       " 'A09070T': '淡水养殖产品生产价格指数(上年=100)',\n",
       " 'A09070U': '淡水捕捞产品生产价格指数(上年=100)',\n",
       " 'A090801': '工业生产者出厂价格指数(上年=100)',\n",
       " 'A090901': '固定资产投资价格指数(上年=100)',\n",
       " 'A090902': '建筑安装工程固定资产投资价格指数(上年=100)',\n",
       " 'A090903': '设备工器具购置固定资产投资价格指数(上年=100)',\n",
       " 'A090904': '其他费用固定资产投资价格指数(上年=100)',\n",
       " 'A090A01': '食品烟酒类居民消费价格指数(上年=100)',\n",
       " 'A090A02': '食品类居民消费价格指数(上年=100)',\n",
       " 'A090A03': '粮食类居民消费价格指数(上年=100)',\n",
       " 'A090A04': '薯类类居民消费价格指数(上年=100)',\n",
       " 'A090A05': '豆类类居民消费价格指数(上年=100)',\n",
       " 'A090A06': '食用油类居民消费价格指数(上年=100)',\n",
       " 'A090A07': '菜类居民消费价格指数(上年=100)',\n",
       " 'A090A08': '鲜菜类居民消费价格指数(上年=100)',\n",
       " 'A090A09': '畜肉类类居民消费价格指数(上年=100)',\n",
       " 'A090A0A': '禽肉类类居民消费价格指数(上年=100)',\n",
       " 'A090A0B': '水产品类居民消费价格指数(上年=100)',\n",
       " 'A090A0C': '蛋类类居民消费价格指数(上年=100)',\n",
       " 'A090A0D': '奶类类居民消费价格指数(上年=100)',\n",
       " 'A090A0E': '干鲜瓜果类类居民消费价格指数(上年=100)',\n",
       " 'A090A0F': '鲜瓜果类居民消费价格指数(上年=100)',\n",
       " 'A090A0G': '糖果糕点类类居民消费价格指数(上年=100)',\n",
       " 'A090A0H': '调味品类居民消费价格指数(上年=100)',\n",
       " 'A090A0I': '其他食品类类居民消费价格指数(上年=100)',\n",
       " 'A090A0J': '茶及饮料类居民消费价格指数(上年=100)',\n",
       " 'A090A0K': '烟酒类居民消费价格指数(上年=100)',\n",
       " 'A090A0L': '在外餐饮类居民消费价格指数(上年=100)',\n",
       " 'A090A0M': '衣着类居民消费价格指数(上年=100)',\n",
       " 'A090A0N': '服装类居民消费价格指数(上年=100)',\n",
       " 'A090A0O': '服装材料类居民消费价格指数(上年=100)',\n",
       " 'A090A0P': '其他衣着及配件类居民消费价格指数(上年=100)',\n",
       " 'A090A0Q': '衣着加工服务费类居民消费价格指数(上年=100)',\n",
       " 'A090A0R': '鞋类类居民消费价格指数(上年=100)',\n",
       " 'A090A0S': '居住类居民消费价格指数(上年=100)',\n",
       " 'A090A0T': '租赁房房租类居民消费价格指数(上年=100)',\n",
       " 'A090A0U': '住房保养维修及管理类居民消费价格指数(上年=100)',\n",
       " 'A090A0V': '水电燃料类居民消费价格指数(上年=100)',\n",
       " 'A090A0W': '自有住房类居民消费价格指数(上年=100)',\n",
       " 'A090A0X': '生活用品及服务类居民消费价格指数(上年=100)',\n",
       " 'A090A0Y': '家具及室内装饰品类居民消费价格指数(上年=100)',\n",
       " 'A090A0Z': '家用器具类居民消费价格指数(上年=100)',\n",
       " 'A090A10': '家用纺织品类居民消费价格指数(上年=100)',\n",
       " 'A090A11': '家庭日用杂品类居民消费价格指数(上年=100)',\n",
       " 'A090A12': '个人护理用品类居民消费价格指数(上年=100)',\n",
       " 'A090A13': '家庭服务类居民消费价格指数(上年=100)',\n",
       " 'A090A14': '交通和通信类居民消费价格指数(上年=100)',\n",
       " 'A090A15': '交通类居民消费价格指数(上年=100)',\n",
       " 'A090A16': '交通工具类居民消费价格指数(上年=100)',\n",
       " 'A090A17': '交通工具用燃料类居民消费价格指数(上年=100)',\n",
       " 'A090A18': '交通工具使用和维修类居民消费价格指数(上年=100)',\n",
       " 'A090A19': '交通费类居民消费价格指数(上年=100)',\n",
       " 'A090A1A': '通信类居民消费价格指数(上年=100)',\n",
       " 'A090A1B': '教育文化和娱乐类居民消费价格指数(上年=100)',\n",
       " 'A090A1C': '教育类居民消费价格指数(上年=100)',\n",
       " 'A090A1D': '教育用品类居民消费价格指数(上年=100)',\n",
       " 'A090A1E': '教育服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1F': '文化娱乐类居民消费价格指数(上年=100)',\n",
       " 'A090A1G': '文娱耐用消费品类居民消费价格指数(上年=100)',\n",
       " 'A090A1H': '其他文娱用品类居民消费价格指数(上年=100)',\n",
       " 'A090A1I': '文化娱乐服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1J': '旅游类居民消费价格指数(上年=100)',\n",
       " 'A090A1K': '医疗保健类居民消费价格指数(上年=100)',\n",
       " 'A090A1L': '药品及医疗器具类居民消费价格指数(上年=100)',\n",
       " 'A090A1M': '医疗服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1N': '其他用品和服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1O': '其他用品类类居民消费价格指数(上年=100)',\n",
       " 'A090A1P': '其他服务类类居民消费价格指数(上年=100)',\n",
       " 'A0A0001': '居民人均可支配收入',\n",
       " 'A0A0002': '居民人均可支配收入_同比增长',\n",
       " 'A0A0003': '城镇居民人均可支配收入',\n",
       " 'A0A0004': '城镇居民人均可支配收入_同比增长',\n",
       " 'A0A0005': '农村居民人均可支配收入',\n",
       " 'A0A0006': '农村居民人均可支配收入_同比增长',\n",
       " 'A0A0007': '居民人均消费支出',\n",
       " 'A0A0008': '居民人均消费支出_同比增长',\n",
       " 'A0A0009': '城镇居民人均消费支出',\n",
       " 'A0A0010': '城镇居民人均消费支出_同比增长',\n",
       " 'A0A0011': '农村居民人均消费支出',\n",
       " 'A0A0012': '农村居民人均消费支出_同比增长',\n",
       " 'A0A0101': '城乡居民人民币储蓄存款年底余额',\n",
       " 'A0A0201': '城镇居民人均可支配收入',\n",
       " 'A0A0202': '城镇居民人均总收入',\n",
       " 'A0A0203': '城镇居民人均工资性收入',\n",
       " 'A0A0204': '城镇居民人均经营净收入',\n",
       " 'A0A0205': '城镇居民人均财产性收入',\n",
       " 'A0A0206': '城镇居民人均转移性收入',\n",
       " 'A0A0301': '城镇居民家庭人均现金消费支出',\n",
       " 'A0A0302': '城镇居民家庭人均食品消费支出',\n",
       " 'A0A030L': '城镇居民家庭人均衣着消费支出',\n",
       " 'A0A030Q': '城镇居民家庭人均居住消费支出',\n",
       " 'A0A030T': '城镇居民家庭人均家庭设备及用品消费支出',\n",
       " 'A0A0310': '城镇居民家庭人均医疗保健消费支出',\n",
       " 'A0A0311': '城镇居民家庭人均交通和通信消费支出',\n",
       " 'A0A0314': '城镇居民家庭人均文教娱乐服务消费支出',\n",
       " 'A0A0318': '城镇居民家庭人均其它消费支出',\n",
       " 'A0A0401': '城镇居民家庭平均每百户摩托车拥有量',\n",
       " 'A0A0402': '城镇居民家庭平均每百户助力车拥有量',\n",
       " 'A0A0403': '城镇居民家庭平均每百户家用汽车拥有量',\n",
       " 'A0A0404': '城镇居民家庭平均每百户洗衣机拥有量',\n",
       " 'A0A0405': '城镇居民家庭平均每百户电冰箱拥有量',\n",
       " 'A0A0406': '城镇居民家庭平均每百户彩色电视机拥有量',\n",
       " 'A0A0407': '城镇居民家庭平均每百户计算机拥有量',\n",
       " 'A0A0408': '城镇居民家庭平均每百户组合音响拥有量',\n",
       " 'A0A0409': '城镇居民家庭平均每百户摄像机拥有量',\n",
       " 'A0A040A': '城镇居民家庭平均每百户照相机拥有量',\n",
       " 'A0A040B': '城镇居民家庭平均每百户钢琴拥有量',\n",
       " 'A0A040C': '城镇居民家庭平均每百户其他中高档乐器拥有量',\n",
       " 'A0A040D': '城镇居民家庭平均每百户微波炉拥有量',\n",
       " 'A0A040E': '城镇居民家庭平均每百户空调拥有量',\n",
       " 'A0A040F': '城镇居民家庭平均每百户淋浴热水器拥有量',\n",
       " 'A0A040G': '城镇居民家庭平均每百户消毒碗柜拥有量',\n",
       " 'A0A040H': '城镇居民家庭平均每百户洗碗机拥有量',\n",
       " 'A0A040I': '城镇居民家庭平均每百户健身器材拥有量',\n",
       " 'A0A040J': '城镇居民家庭平均每百户固定电话拥有量',\n",
       " 'A0A040K': '城镇居民家庭平均每百户移动电话拥有量',\n",
       " 'A0A0501': '农村居民家庭人均纯收入',\n",
       " 'A0A0502': '农村居民家庭人均工资性纯收入',\n",
       " 'A0A0503': '农村居民家庭人均家庭经营纯收入',\n",
       " 'A0A0504': '农村居民家庭人均财产性纯收入',\n",
       " 'A0A0505': '农村居民家庭人均转移性纯收入',\n",
       " 'A0A0601': '农村居民家庭平均每人消费支出',\n",
       " 'A0A0602': '农村居民家庭平均每人食品消费支出',\n",
       " 'A0A0603': '农村居民家庭平均每人衣着消费支出',\n",
       " 'A0A0604': '农村居民家庭平均每人居住消费支出',\n",
       " 'A0A0605': '农村居民家庭平均每人家庭设备及用品消费支出',\n",
       " 'A0A0606': '农村居民家庭平均每人交通通信消费支出',\n",
       " 'A0A0607': '农村居民家庭平均每人文教娱乐消费支出',\n",
       " 'A0A0608': '农村居民家庭平均每人医疗保健消费支出',\n",
       " 'A0A0609': '农村居民家庭平均每人其他消费支出',\n",
       " 'A0A0901': '农村居民家庭平均每百户洗衣机拥有量',\n",
       " 'A0A0902': '农村居民家庭平均每百户电冰箱拥有量',\n",
       " 'A0A0903': '农村居民家庭平均每百户空调拥有量',\n",
       " 'A0A0904': '农村居民家庭平均每百户抽油烟机拥有量',\n",
       " 'A0A0905': '农村居民家庭平均每百户自行车拥有量',\n",
       " 'A0A0906': '农村居民家庭平均每百户摩托车拥有量',\n",
       " 'A0A0907': '农村居民家庭平均每百户固定电话拥有量',\n",
       " 'A0A0908': '农村居民家庭平均每百户移动电话拥有量',\n",
       " 'A0A0909': '农村居民家庭平均每百户黑白电视机拥有量',\n",
       " 'A0A090A': '农村居民家庭平均每百户彩色电视机拥有量',\n",
       " 'A0A090B': '农村居民家庭平均每百户照相机拥有量',\n",
       " 'A0A090C': '农村居民家庭平均每百户计算机拥有量',\n",
       " 'A0A0A01': '农村居民人均住房面积',\n",
       " 'A0A0A02': '农村居民家庭住房价值',\n",
       " 'A0A0A03': '农村居民家庭住房钢筋混凝土结构',\n",
       " 'A0A0A04': '农村居民家庭住房砖木结构',\n",
       " 'A0B0101': '全部地级及以上城市数',\n",
       " 'A0B0102': '城市市辖区年末总人口为400万以上的地级及以上城市数',\n",
       " 'A0B0103': '城市市辖区年末总人口为200-400万的地级及以上城市数',\n",
       " 'A0B0104': '城市市辖区年末总人口为100-200万的地级及以上城市数',\n",
       " 'A0B0105': '城市市辖区年末总人口为50-100万的地级及以上城市数',\n",
       " 'A0B0106': '城市市辖区年末总人口为20-50万的地级及以上城市数',\n",
       " 'A0B0107': '城市市辖区年末总人口为20万以下的地级及以上城市数',\n",
       " 'A0B0201': '城区面积',\n",
       " ...}"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "指标字典 = df_a[\"cname\"].to_dict()\n",
    "指标字典"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 创建地区字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{110000: '北京市',\n",
       " 120000: '天津市',\n",
       " 130000: '河北省',\n",
       " 140000: '山西省',\n",
       " 150000: '内蒙古自治区',\n",
       " 210000: '辽宁省',\n",
       " 220000: '吉林省',\n",
       " 230000: '黑龙江省',\n",
       " 310000: '上海市',\n",
       " 320000: '江苏省',\n",
       " 330000: '浙江省',\n",
       " 340000: '安徽省',\n",
       " 350000: '福建省',\n",
       " 360000: '江西省',\n",
       " 370000: '山东省',\n",
       " 410000: '河南省',\n",
       " 420000: '湖北省',\n",
       " 430000: '湖南省',\n",
       " 440000: '广东省',\n",
       " 450000: '广西壮族自治区',\n",
       " 460000: '海南省',\n",
       " 500000: '重庆市',\n",
       " 510000: '四川省',\n",
       " 520000: '贵州省',\n",
       " 530000: '云南省',\n",
       " 540000: '西藏自治区',\n",
       " 610000: '陕西省',\n",
       " 620000: '甘肃省',\n",
       " 630000: '青海省',\n",
       " 640000: '宁夏回族自治区',\n",
       " 650000: '新疆维吾尔自治区'}"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "地区字典 = df_b.set_index(\"id\")[\"name\"].to_dict()\n",
    "地区字典"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用字典进行数据框转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>zb</th>\n",
       "      <th>sj</th>\n",
       "      <th>data</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>reg</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>0</td>\n",
       "      <td>A010101</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>1</td>\n",
       "      <td>A010101</td>\n",
       "      <td>2017</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>2</td>\n",
       "      <td>A010101</td>\n",
       "      <td>2016</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>3</td>\n",
       "      <td>A010101</td>\n",
       "      <td>2015</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>4</td>\n",
       "      <td>A010101</td>\n",
       "      <td>2014</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>908295</td>\n",
       "      <td>A0S0B05</td>\n",
       "      <td>2013</td>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>908296</td>\n",
       "      <td>A0S0B05</td>\n",
       "      <td>2012</td>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>908297</td>\n",
       "      <td>A0S0B05</td>\n",
       "      <td>2011</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>908298</td>\n",
       "      <td>A0S0B05</td>\n",
       "      <td>2010</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>908299</td>\n",
       "      <td>A0S0B05</td>\n",
       "      <td>2009</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           index       zb    sj       data\n",
       "reg                                       \n",
       "北京市            0  A010101  2018        NaN\n",
       "北京市            1  A010101  2017        NaN\n",
       "北京市            2  A010101  2016        NaN\n",
       "北京市            3  A010101  2015        NaN\n",
       "北京市            4  A010101  2014        NaN\n",
       "...          ...      ...   ...        ...\n",
       "新疆维吾尔自治区  908295  A0S0B05  2013  33.856600\n",
       "新疆维吾尔自治区  908296  A0S0B05  2012  24.914044\n",
       "新疆维吾尔自治区  908297  A0S0B05  2011        NaN\n",
       "新疆维吾尔自治区  908298  A0S0B05  2010        NaN\n",
       "新疆维吾尔自治区  908299  A0S0B05  2009        NaN\n",
       "\n",
       "[908300 rows x 4 columns]"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_p = df_raw.reset_index().set_index(\"reg\").rename(index=地区字典)\n",
    "df_p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>reg</th>\n",
       "      <th>index</th>\n",
       "      <th>sj</th>\n",
       "      <th>data</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>zb</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>北京市</td>\n",
       "      <td>0</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>北京市</td>\n",
       "      <td>1</td>\n",
       "      <td>2017</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>北京市</td>\n",
       "      <td>2</td>\n",
       "      <td>2016</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>北京市</td>\n",
       "      <td>3</td>\n",
       "      <td>2015</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>北京市</td>\n",
       "      <td>4</td>\n",
       "      <td>2014</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908295</td>\n",
       "      <td>2013</td>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908296</td>\n",
       "      <td>2012</td>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908297</td>\n",
       "      <td>2011</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908298</td>\n",
       "      <td>2010</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908299</td>\n",
       "      <td>2009</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     reg   index    sj       data\n",
       "zb                                               \n",
       "地级区划数                北京市       0  2018        NaN\n",
       "地级区划数                北京市       1  2017        NaN\n",
       "地级区划数                北京市       2  2016        NaN\n",
       "地级区划数                北京市       3  2015        NaN\n",
       "地级区划数                北京市       4  2014        NaN\n",
       "...                  ...     ...   ...        ...\n",
       "城乡居民社会养老保险累计结余  新疆维吾尔自治区  908295  2013  33.856600\n",
       "城乡居民社会养老保险累计结余  新疆维吾尔自治区  908296  2012  24.914044\n",
       "城乡居民社会养老保险累计结余  新疆维吾尔自治区  908297  2011        NaN\n",
       "城乡居民社会养老保险累计结余  新疆维吾尔自治区  908298  2010        NaN\n",
       "城乡居民社会养老保险累计结余  新疆维吾尔自治区  908299  2009        NaN\n",
       "\n",
       "[908300 rows x 4 columns]"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_q = df_1.reset_index().set_index(\"zb\").rename(index=指标字典)\n",
    "df_q"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>index</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>北京市</td>\n",
       "      <td>0</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>北京市</td>\n",
       "      <td>1</td>\n",
       "      <td>2017</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2</td>\n",
       "      <td>2016</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>北京市</td>\n",
       "      <td>3</td>\n",
       "      <td>2015</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>北京市</td>\n",
       "      <td>4</td>\n",
       "      <td>2014</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908295</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908295</td>\n",
       "      <td>2013</td>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908296</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908296</td>\n",
       "      <td>2012</td>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908297</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908297</td>\n",
       "      <td>2011</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908298</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908298</td>\n",
       "      <td>2010</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908299</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>908299</td>\n",
       "      <td>2009</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                    指标        地区   index     年         数据\n",
       "0                地级区划数       北京市       0  2018        NaN\n",
       "1                地级区划数       北京市       1  2017        NaN\n",
       "2                地级区划数       北京市       2  2016        NaN\n",
       "3                地级区划数       北京市       3  2015        NaN\n",
       "4                地级区划数       北京市       4  2014        NaN\n",
       "...                ...       ...     ...   ...        ...\n",
       "908295  城乡居民社会养老保险累计结余  新疆维吾尔自治区  908295  2013  33.856600\n",
       "908296  城乡居民社会养老保险累计结余  新疆维吾尔自治区  908296  2012  24.914044\n",
       "908297  城乡居民社会养老保险累计结余  新疆维吾尔自治区  908297  2011        NaN\n",
       "908298  城乡居民社会养老保险累计结余  新疆维吾尔自治区  908298  2010        NaN\n",
       "908299  城乡居民社会养老保险累计结余  新疆维吾尔自治区  908299  2009        NaN\n",
       "\n",
       "[908300 rows x 5 columns]"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_m = df_q.reset_index().rename(columns = {\"zb\":\"指标\",\"reg\":\"地区\",\"sj\":\"年\",\"data\":\"数据\"})\n",
    "df_m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 实现快速查找"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2017</td>\n",
       "      <td>18.2340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2016</td>\n",
       "      <td>17.5795</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2015</td>\n",
       "      <td>19.8221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2014</td>\n",
       "      <td>20.2910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2013</td>\n",
       "      <td>20.2139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2012</td>\n",
       "      <td>22.6962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2011</td>\n",
       "      <td>21.6380</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2010</td>\n",
       "      <td>16.2606</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业城镇私营企业和个体就业人员</th>\n",
       "      <td>2009</td>\n",
       "      <td>16.3136</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>310 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                     年       数据\n",
       "指标                             \n",
       "制造业城镇私营企业和个体就业人员  2018      NaN\n",
       "制造业城镇私营企业和个体就业人员  2017  18.2340\n",
       "制造业城镇私营企业和个体就业人员  2016  17.5795\n",
       "制造业城镇私营企业和个体就业人员  2015  19.8221\n",
       "制造业城镇私营企业和个体就业人员  2014  20.2910\n",
       "...                ...      ...\n",
       "制造业城镇私营企业和个体就业人员  2013  20.2139\n",
       "制造业城镇私营企业和个体就业人员  2012  22.6962\n",
       "制造业城镇私营企业和个体就业人员  2011  21.6380\n",
       "制造业城镇私营企业和个体就业人员  2010  16.2606\n",
       "制造业城镇私营企业和个体就业人员  2009  16.3136\n",
       "\n",
       "[310 rows x 2 columns]"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " df_m.set_index(\"指标\").loc[\"制造业城镇私营企业和个体就业人员\",\"年\":\"数据\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>index</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>19530</th>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>19530</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19531</th>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>19531</td>\n",
       "      <td>2017</td>\n",
       "      <td>812.8589</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19532</th>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>19532</td>\n",
       "      <td>2016</td>\n",
       "      <td>791.5197</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19533</th>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>19533</td>\n",
       "      <td>2015</td>\n",
       "      <td>777.3448</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19534</th>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>19534</td>\n",
       "      <td>2014</td>\n",
       "      <td>755.8601</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56725</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>56725</td>\n",
       "      <td>2013</td>\n",
       "      <td>46636.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56726</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>56726</td>\n",
       "      <td>2012</td>\n",
       "      <td>45071.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56727</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>56727</td>\n",
       "      <td>2011</td>\n",
       "      <td>39862.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56728</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>56728</td>\n",
       "      <td>2010</td>\n",
       "      <td>35950.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56729</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>56729</td>\n",
       "      <td>2009</td>\n",
       "      <td>31217.0000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22940 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          指标        地区  index     年          数据\n",
       "19530               城镇单位就业人员       北京市  19530  2018         NaN\n",
       "19531               城镇单位就业人员       北京市  19531  2017    812.8589\n",
       "19532               城镇单位就业人员       北京市  19532  2016    791.5197\n",
       "19533               城镇单位就业人员       北京市  19533  2015    777.3448\n",
       "19534               城镇单位就业人员       北京市  19534  2014    755.8601\n",
       "...                      ...       ...    ...   ...         ...\n",
       "56725  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  56725  2013  46636.0000\n",
       "56726  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  56726  2012  45071.0000\n",
       "56727  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  56727  2011  39862.0000\n",
       "56728  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  56728  2010  35950.0000\n",
       "56729  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  56729  2009  31217.0000\n",
       "\n",
       "[22940 rows x 5 columns]"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dslice = df_m [ df_m.指标.str.contains(\"城镇单位就业人员\")]\n",
    "dslice"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['城镇单位就业人员', '农林牧渔业城镇单位就业人员', '采矿业城镇单位就业人员', '制造业城镇单位就业人员',\n",
       "       '电力、燃气及水的生产和供应业城镇单位就业人员', '建筑业城镇单位就业人员', '交通运输、仓储及邮电通信业城镇单位就业人员',\n",
       "       '信息传输、计算机服务和软件业城镇单位就业人员', '批发和零售业城镇单位就业人员', '住宿和餐饮业城镇单位就业人员',\n",
       "       '金融业城镇单位就业人员', '房地产业城镇单位就业人员', '租赁和商务服务业城镇单位就业人员',\n",
       "       '科学研究、技术服务和地质勘查业城镇单位就业人员', '水利、环境和公共设施管理业城镇单位就业人员',\n",
       "       '居民服务和其他服务业城镇单位就业人员', '教育业城镇单位就业人员', '卫生、社会保障和社会福利业城镇单位就业人员',\n",
       "       '文化、体育和娱乐业城镇单位就业人员', '公共管理和社会组织城镇单位就业人员', '城镇单位就业人员工资总额',\n",
       "       '国有城镇单位就业人员工资总额', '其他城镇单位就业人员工资总额', '城镇单位就业人员工资总额指数(上年=100)',\n",
       "       '国有城镇单位就业人员工资总额指数(上年=100)', '其他城镇单位就业人员工资总额指数(上年=100)',\n",
       "       '城镇单位就业人员平均工资', '城镇单位就业人员平均货币工资指数(上年=100)',\n",
       "       '国有城镇单位就业人员平均货币工资指数(上年=100)', '其他城镇单位就业人员平均货币工资指数(上年=100)',\n",
       "       '城镇单位就业人员平均实际工资指数(上年=100)', '国有城镇单位就业人员平均实际工资指数(上年=100)',\n",
       "       '其他城镇单位就业人员平均实际工资指数(上年=100)', '农、林、牧、渔业城镇单位就业人员工资总额',\n",
       "       '采矿业城镇单位就业人员工资总额', '制造业城镇单位就业人员工资总额', '电力、燃气及水的生产和供应业城镇单位就业人员工资总额',\n",
       "       '建筑业城镇单位就业人员工资总额', '交通运输、仓储和邮政业城镇单位就业人员工资总额',\n",
       "       '信息传输、计算机服务和软件业城镇单位就业人员工资总额', '批发和零售业城镇单位就业人员工资总额',\n",
       "       '住宿和餐饮业城镇单位就业人员工资总额', '金融业城镇单位就业人员工资总额', '房地产业城镇单位就业人员工资总额',\n",
       "       '租赁和商务服务业城镇单位就业人员工资总额', '科学研究、技术服务和地质勘查业城镇单位就业人员工资总额',\n",
       "       '水利、环境和公共设施管理业城镇单位就业人员工资总额', '居民服务和其他服务业城镇单位就业人员工资总额',\n",
       "       '教育城镇单位就业人员工资总额', '卫生、社会保障和社会福利业城镇单位就业人员工资总额',\n",
       "       '文化、体育和娱乐业城镇单位就业人员工资总额', '公共管理和社会组织城镇单位就业人员工资总额',\n",
       "       '农、林、牧、渔业城镇单位就业人员平均工资', '采矿业城镇单位就业人员平均工资', '制造业城镇单位就业人员平均工资',\n",
       "       '电力、燃气及水的生产和供应业城镇单位就业人员平均工资', '建筑业城镇单位就业人员平均工资',\n",
       "       '交通运输、仓储和邮政业城镇单位就业人员平均工资', '信息传输、计算机服务和软件业城镇单位就业人员平均工资',\n",
       "       '批发和零售业城镇单位就业人员平均工资', '住宿和餐饮业城镇单位就业人员平均工资', '金融业城镇单位就业人员平均工资',\n",
       "       '房地产业城镇单位就业人员平均工资', '租赁和商务服务业城镇单位就业人员平均工资',\n",
       "       '科学研究、技术服务和地质勘查业城镇单位就业人员平均工资', '水利、环境和公共设施管理业城镇单位就业人员平均工资',\n",
       "       '居民服务和其他服务业城镇单位就业人员平均工资', '教育城镇单位就业人员平均工资',\n",
       "       '卫生、社会保障和社会福利业城镇单位就业人员平均工资', '文化、体育和娱乐业城镇单位就业人员平均工资',\n",
       "       '公共管理和社会组织城镇单位就业人员平均工资'], dtype=object)"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "指标分的可能性 = dslice.指标.unique()\n",
    "指标分的可能性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['', ''],\n",
       " ['农林牧渔业', ''],\n",
       " ['采矿业', ''],\n",
       " ['制造业', ''],\n",
       " ['电力、燃气及水的生产和供应业', ''],\n",
       " ['建筑业', ''],\n",
       " ['交通运输、仓储及邮电通信业', ''],\n",
       " ['信息传输、计算机服务和软件业', ''],\n",
       " ['批发和零售业', ''],\n",
       " ['住宿和餐饮业', ''],\n",
       " ['金融业', ''],\n",
       " ['房地产业', ''],\n",
       " ['租赁和商务服务业', ''],\n",
       " ['科学研究、技术服务和地质勘查业', ''],\n",
       " ['水利、环境和公共设施管理业', ''],\n",
       " ['居民服务和其他服务业', ''],\n",
       " ['教育业', ''],\n",
       " ['卫生、社会保障和社会福利业', ''],\n",
       " ['文化、体育和娱乐业', ''],\n",
       " ['公共管理和社会组织', ''],\n",
       " ['', '工资总额'],\n",
       " ['国有', '工资总额'],\n",
       " ['其他', '工资总额'],\n",
       " ['', '工资总额指数(上年=100)'],\n",
       " ['国有', '工资总额指数(上年=100)'],\n",
       " ['其他', '工资总额指数(上年=100)'],\n",
       " ['', '平均工资'],\n",
       " ['', '平均货币工资指数(上年=100)'],\n",
       " ['国有', '平均货币工资指数(上年=100)'],\n",
       " ['其他', '平均货币工资指数(上年=100)'],\n",
       " ['', '平均实际工资指数(上年=100)'],\n",
       " ['国有', '平均实际工资指数(上年=100)'],\n",
       " ['其他', '平均实际工资指数(上年=100)'],\n",
       " ['农、林、牧、渔业', '工资总额'],\n",
       " ['采矿业', '工资总额'],\n",
       " ['制造业', '工资总额'],\n",
       " ['电力、燃气及水的生产和供应业', '工资总额'],\n",
       " ['建筑业', '工资总额'],\n",
       " ['交通运输、仓储和邮政业', '工资总额'],\n",
       " ['信息传输、计算机服务和软件业', '工资总额'],\n",
       " ['批发和零售业', '工资总额'],\n",
       " ['住宿和餐饮业', '工资总额'],\n",
       " ['金融业', '工资总额'],\n",
       " ['房地产业', '工资总额'],\n",
       " ['租赁和商务服务业', '工资总额'],\n",
       " ['科学研究、技术服务和地质勘查业', '工资总额'],\n",
       " ['水利、环境和公共设施管理业', '工资总额'],\n",
       " ['居民服务和其他服务业', '工资总额'],\n",
       " ['教育', '工资总额'],\n",
       " ['卫生、社会保障和社会福利业', '工资总额'],\n",
       " ['文化、体育和娱乐业', '工资总额'],\n",
       " ['公共管理和社会组织', '工资总额'],\n",
       " ['农、林、牧、渔业', '平均工资'],\n",
       " ['采矿业', '平均工资'],\n",
       " ['制造业', '平均工资'],\n",
       " ['电力、燃气及水的生产和供应业', '平均工资'],\n",
       " ['建筑业', '平均工资'],\n",
       " ['交通运输、仓储和邮政业', '平均工资'],\n",
       " ['信息传输、计算机服务和软件业', '平均工资'],\n",
       " ['批发和零售业', '平均工资'],\n",
       " ['住宿和餐饮业', '平均工资'],\n",
       " ['金融业', '平均工资'],\n",
       " ['房地产业', '平均工资'],\n",
       " ['租赁和商务服务业', '平均工资'],\n",
       " ['科学研究、技术服务和地质勘查业', '平均工资'],\n",
       " ['水利、环境和公共设施管理业', '平均工资'],\n",
       " ['居民服务和其他服务业', '平均工资'],\n",
       " ['教育', '平均工资'],\n",
       " ['卫生、社会保障和社会福利业', '平均工资'],\n",
       " ['文化、体育和娱乐业', '平均工资'],\n",
       " ['公共管理和社会组织', '平均工资']]"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "it = [ x.split(\"城镇单位就业人员\") for x in dslice.指标.unique() ]\n",
    "it"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['国有', '工资总额'],\n",
       " ['国有', '工资总额指数(上年=100)'],\n",
       " ['国有', '平均货币工资指数(上年=100)'],\n",
       " ['国有', '平均实际工资指数(上年=100)'],\n",
       " ['批发和零售业', '工资总额'],\n",
       " ['批发和零售业', '平均工资']]"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "指标分可能性 = [  [x,y] for (x,y) in it if x==\"国有\"or x==\"批发和零售业\" and y!=\"\"]\n",
    "指标分可能性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['国有城镇单位就业人员工资总额',\n",
       " '国有城镇单位就业人员工资总额指数(上年=100)',\n",
       " '国有城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " '国有城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " '批发和零售业城镇单位就业人员工资总额',\n",
       " '批发和零售业城镇单位就业人员平均工资']"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "所有指标分可能性 = [\"城镇单位就业人员\".join(x) for x in 指标分可能性]\n",
    "所有指标分可能性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>index</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34410</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34411</td>\n",
       "      <td>2017</td>\n",
       "      <td>2663.84409</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34412</td>\n",
       "      <td>2016</td>\n",
       "      <td>2350.74965</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34413</td>\n",
       "      <td>2015</td>\n",
       "      <td>2106.60123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34414</td>\n",
       "      <td>2014</td>\n",
       "      <td>1932.38647</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1855</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53315</td>\n",
       "      <td>2013</td>\n",
       "      <td>49631.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1856</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53316</td>\n",
       "      <td>2012</td>\n",
       "      <td>45733.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1857</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53317</td>\n",
       "      <td>2011</td>\n",
       "      <td>40300.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1858</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53318</td>\n",
       "      <td>2010</td>\n",
       "      <td>32343.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1859</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53319</td>\n",
       "      <td>2009</td>\n",
       "      <td>26889.00000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1860 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                      指标        地区  index     年           数据\n",
       "0         国有城镇单位就业人员工资总额       北京市  34410  2018          NaN\n",
       "1         国有城镇单位就业人员工资总额       北京市  34411  2017   2663.84409\n",
       "2         国有城镇单位就业人员工资总额       北京市  34412  2016   2350.74965\n",
       "3         国有城镇单位就业人员工资总额       北京市  34413  2015   2106.60123\n",
       "4         国有城镇单位就业人员工资总额       北京市  34414  2014   1932.38647\n",
       "...                  ...       ...    ...   ...          ...\n",
       "1855  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53315  2013  49631.00000\n",
       "1856  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53316  2012  45733.00000\n",
       "1857  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53317  2011  40300.00000\n",
       "1858  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53318  2010  32343.00000\n",
       "1859  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53319  2009  26889.00000\n",
       "\n",
       "[1860 rows x 5 columns]"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片 = df_m.set_index(\"指标\").loc[所有指标分可能性].reset_index()\n",
    "df_就业切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>index</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>1860</td>\n",
       "      <td>1860</td>\n",
       "      <td>1860.000000</td>\n",
       "      <td>1860.000000</td>\n",
       "      <td>1674.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unique</th>\n",
       "      <td>6</td>\n",
       "      <td>31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>top</th>\n",
       "      <td>国有城镇单位就业人员平均货币工资指数(上年=100)</td>\n",
       "      <td>河南省</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>freq</th>\n",
       "      <td>310</td>\n",
       "      <td>60</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>41642.833333</td>\n",
       "      <td>2013.500000</td>\n",
       "      <td>7616.261964</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6510.930322</td>\n",
       "      <td>2.873054</td>\n",
       "      <td>18028.567421</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>34410.000000</td>\n",
       "      <td>2009.000000</td>\n",
       "      <td>1.686520</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>35804.750000</td>\n",
       "      <td>2011.000000</td>\n",
       "      <td>107.747737</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>39679.500000</td>\n",
       "      <td>2013.500000</td>\n",
       "      <td>113.818832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>46964.250000</td>\n",
       "      <td>2016.000000</td>\n",
       "      <td>1057.489457</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>53319.000000</td>\n",
       "      <td>2018.000000</td>\n",
       "      <td>139627.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                指标    地区         index            年  \\\n",
       "count                         1860  1860   1860.000000  1860.000000   \n",
       "unique                           6    31           NaN          NaN   \n",
       "top     国有城镇单位就业人员平均货币工资指数(上年=100)   河南省           NaN          NaN   \n",
       "freq                           310    60           NaN          NaN   \n",
       "mean                           NaN   NaN  41642.833333  2013.500000   \n",
       "std                            NaN   NaN   6510.930322     2.873054   \n",
       "min                            NaN   NaN  34410.000000  2009.000000   \n",
       "25%                            NaN   NaN  35804.750000  2011.000000   \n",
       "50%                            NaN   NaN  39679.500000  2013.500000   \n",
       "75%                            NaN   NaN  46964.250000  2016.000000   \n",
       "max                            NaN   NaN  53319.000000  2018.000000   \n",
       "\n",
       "                   数据  \n",
       "count     1674.000000  \n",
       "unique            NaN  \n",
       "top               NaN  \n",
       "freq              NaN  \n",
       "mean      7616.261964  \n",
       "std      18028.567421  \n",
       "min          1.686520  \n",
       "25%        107.747737  \n",
       "50%        113.818832  \n",
       "75%       1057.489457  \n",
       "max     139627.000000  "
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片.describe(include=\"all\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 分进合击出报表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>年</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>1.68652</td>\n",
       "      <td>4521.921272</td>\n",
       "      <td>57948.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>2.30000</td>\n",
       "      <td>5239.304301</td>\n",
       "      <td>64150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011</th>\n",
       "      <td>1.93585</td>\n",
       "      <td>6132.333529</td>\n",
       "      <td>82882.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>2.26419</td>\n",
       "      <td>6940.254676</td>\n",
       "      <td>91658.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>5.07767</td>\n",
       "      <td>7731.749476</td>\n",
       "      <td>100692.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>6.88443</td>\n",
       "      <td>8505.458568</td>\n",
       "      <td>107673.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>8.37898</td>\n",
       "      <td>9156.708428</td>\n",
       "      <td>117396.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>7.47547</td>\n",
       "      <td>9758.399315</td>\n",
       "      <td>127489.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>7.49941</td>\n",
       "      <td>10560.228108</td>\n",
       "      <td>139627.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           数据                        \n",
       "          min          mean       max\n",
       "年                                    \n",
       "2009  1.68652   4521.921272   57948.0\n",
       "2010  2.30000   5239.304301   64150.0\n",
       "2011  1.93585   6132.333529   82882.0\n",
       "2012  2.26419   6940.254676   91658.0\n",
       "2013  5.07767   7731.749476  100692.0\n",
       "2014  6.88443   8505.458568  107673.0\n",
       "2015  8.37898   9156.708428  117396.0\n",
       "2016  7.47547   9758.399315  127489.0\n",
       "2017  7.49941  10560.228108  139627.0\n",
       "2018      NaN           NaN       NaN"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片.groupby([\"年\"]).agg({\"数据\":[\"min\",\"mean\",\"max\"]})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 多层次数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0           国有\n",
       "1           国有\n",
       "2           国有\n",
       "3           国有\n",
       "4           国有\n",
       "         ...  \n",
       "1855    批发和零售业\n",
       "1856    批发和零售业\n",
       "1857    批发和零售业\n",
       "1858    批发和零售业\n",
       "1859    批发和零售业\n",
       "Name: 行业指标, Length: 1860, dtype: object"
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "df_就业切片[\"行业指标\"] = [x.split(\"城镇单位就业人员\")[0] for x in df_就业切片.指标 ]\n",
    "df_就业切片[\"行业指标\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th>行业指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">上海市</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">2009</th>\n",
       "      <th>国有</th>\n",
       "      <td>113.400000</td>\n",
       "      <td>320.906046</td>\n",
       "      <td>938.65973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>136.544510</td>\n",
       "      <td>26344.772255</td>\n",
       "      <td>52553.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">2010</th>\n",
       "      <th>国有</th>\n",
       "      <td>107.900000</td>\n",
       "      <td>346.750000</td>\n",
       "      <td>1055.50000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>163.900000</td>\n",
       "      <td>30836.450000</td>\n",
       "      <td>61509.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011</th>\n",
       "      <th>国有</th>\n",
       "      <td>110.336356</td>\n",
       "      <td>388.770411</td>\n",
       "      <td>1213.58366</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">黑龙江省</th>\n",
       "      <th>2016</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>88.801490</td>\n",
       "      <td>24332.400745</td>\n",
       "      <td>48576.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">2017</th>\n",
       "      <th>国有</th>\n",
       "      <td>103.802374</td>\n",
       "      <td>441.775277</td>\n",
       "      <td>1453.53172</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>89.262150</td>\n",
       "      <td>25498.131075</td>\n",
       "      <td>50907.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">2018</th>\n",
       "      <th>国有</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>620 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          数据                           \n",
       "                         min          mean          max\n",
       "地区   年    行业指标                                         \n",
       "上海市  2009 国有      113.400000    320.906046    938.65973\n",
       "          批发和零售业  136.544510  26344.772255  52553.00000\n",
       "     2010 国有      107.900000    346.750000   1055.50000\n",
       "          批发和零售业  163.900000  30836.450000  61509.00000\n",
       "     2011 国有      110.336356    388.770411   1213.58366\n",
       "...                      ...           ...          ...\n",
       "黑龙江省 2016 批发和零售业   88.801490  24332.400745  48576.00000\n",
       "     2017 国有      103.802374    441.775277   1453.53172\n",
       "          批发和零售业   89.262150  25498.131075  50907.00000\n",
       "     2018 国有             NaN           NaN          NaN\n",
       "          批发和零售业         NaN           NaN          NaN\n",
       "\n",
       "[620 rows x 3 columns]"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片.groupby([\"地区\",\"年\",\"行业指标\"]).agg({\"数据\":[\"min\",\"mean\",\"max\"]})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_就业切片.to_csv(\"就业切片.tsv\",encoding=\"utf8\",sep=\"\\t\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [],
   "source": [
    "ct = df_就业切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">上海市</th>\n",
       "      <th>2017</th>\n",
       "      <td>104.200000</td>\n",
       "      <td>23710.329265</td>\n",
       "      <td>139627.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>105.132354</td>\n",
       "      <td>21661.218765</td>\n",
       "      <td>127489.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>99.587312</td>\n",
       "      <td>19952.217237</td>\n",
       "      <td>117396.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <th>2017</th>\n",
       "      <td>113.300000</td>\n",
       "      <td>18597.335206</td>\n",
       "      <td>107731.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <th>2014</th>\n",
       "      <td>102.000000</td>\n",
       "      <td>18320.012768</td>\n",
       "      <td>107673.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>辽宁省</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>重庆市</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陕西省</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青海省</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黑龙江省</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>310 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                   数据                        \n",
       "                  min          mean       max\n",
       "地区   年                                       \n",
       "上海市  2017  104.200000  23710.329265  139627.0\n",
       "     2016  105.132354  21661.218765  127489.0\n",
       "     2015   99.587312  19952.217237  117396.0\n",
       "北京市  2017  113.300000  18597.335206  107731.0\n",
       "上海市  2014  102.000000  18320.012768  107673.0\n",
       "...               ...           ...       ...\n",
       "辽宁省  2018         NaN           NaN       NaN\n",
       "重庆市  2018         NaN           NaN       NaN\n",
       "陕西省  2018         NaN           NaN       NaN\n",
       "青海省  2018         NaN           NaN       NaN\n",
       "黑龙江省 2018         NaN           NaN       NaN\n",
       "\n",
       "[310 rows x 3 columns]"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ct.groupby(['地区',\"年\"]).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).sort_values(by = ('数据',\"mean\"),ascending = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>index</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "      <th>行业指标</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34410</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "      <td>国有</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34411</td>\n",
       "      <td>2017</td>\n",
       "      <td>2663.84409</td>\n",
       "      <td>国有</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34412</td>\n",
       "      <td>2016</td>\n",
       "      <td>2350.74965</td>\n",
       "      <td>国有</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34413</td>\n",
       "      <td>2015</td>\n",
       "      <td>2106.60123</td>\n",
       "      <td>国有</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>国有城镇单位就业人员工资总额</td>\n",
       "      <td>北京市</td>\n",
       "      <td>34414</td>\n",
       "      <td>2014</td>\n",
       "      <td>1932.38647</td>\n",
       "      <td>国有</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1855</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53315</td>\n",
       "      <td>2013</td>\n",
       "      <td>49631.00000</td>\n",
       "      <td>批发和零售业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1856</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53316</td>\n",
       "      <td>2012</td>\n",
       "      <td>45733.00000</td>\n",
       "      <td>批发和零售业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1857</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53317</td>\n",
       "      <td>2011</td>\n",
       "      <td>40300.00000</td>\n",
       "      <td>批发和零售业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1858</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53318</td>\n",
       "      <td>2010</td>\n",
       "      <td>32343.00000</td>\n",
       "      <td>批发和零售业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1859</th>\n",
       "      <td>批发和零售业城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>53319</td>\n",
       "      <td>2009</td>\n",
       "      <td>26889.00000</td>\n",
       "      <td>批发和零售业</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1860 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                      指标        地区  index     年           数据    行业指标\n",
       "0         国有城镇单位就业人员工资总额       北京市  34410  2018          NaN      国有\n",
       "1         国有城镇单位就业人员工资总额       北京市  34411  2017   2663.84409      国有\n",
       "2         国有城镇单位就业人员工资总额       北京市  34412  2016   2350.74965      国有\n",
       "3         国有城镇单位就业人员工资总额       北京市  34413  2015   2106.60123      国有\n",
       "4         国有城镇单位就业人员工资总额       北京市  34414  2014   1932.38647      国有\n",
       "...                  ...       ...    ...   ...          ...     ...\n",
       "1855  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53315  2013  49631.00000  批发和零售业\n",
       "1856  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53316  2012  45733.00000  批发和零售业\n",
       "1857  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53317  2011  40300.00000  批发和零售业\n",
       "1858  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53318  2010  32343.00000  批发和零售业\n",
       "1859  批发和零售业城镇单位就业人员平均工资  新疆维吾尔自治区  53319  2009  26889.00000  批发和零售业\n",
       "\n",
       "[1860 rows x 6 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <td>84.600000</td>\n",
       "      <td>16671.247534</td>\n",
       "      <td>139627.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>105.165692</td>\n",
       "      <td>14371.685334</td>\n",
       "      <td>107731.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>天津市</th>\n",
       "      <td>38.805610</td>\n",
       "      <td>9686.157402</td>\n",
       "      <td>76632.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江省</th>\n",
       "      <td>97.607180</td>\n",
       "      <td>9654.545929</td>\n",
       "      <td>77636.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>西藏自治区</th>\n",
       "      <td>1.686520</td>\n",
       "      <td>9473.865907</td>\n",
       "      <td>80354.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东省</th>\n",
       "      <td>97.200000</td>\n",
       "      <td>9333.879774</td>\n",
       "      <td>71209.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏省</th>\n",
       "      <td>80.125870</td>\n",
       "      <td>8779.187990</td>\n",
       "      <td>72843.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>16.765430</td>\n",
       "      <td>8190.391353</td>\n",
       "      <td>66008.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建省</th>\n",
       "      <td>36.929510</td>\n",
       "      <td>7913.008126</td>\n",
       "      <td>61504.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>贵州省</th>\n",
       "      <td>23.899270</td>\n",
       "      <td>7661.444256</td>\n",
       "      <td>63243.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>重庆市</th>\n",
       "      <td>27.854130</td>\n",
       "      <td>7427.716144</td>\n",
       "      <td>59596.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>四川省</th>\n",
       "      <td>43.132070</td>\n",
       "      <td>7282.702139</td>\n",
       "      <td>56788.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>湖南省</th>\n",
       "      <td>39.732650</td>\n",
       "      <td>6853.664206</td>\n",
       "      <td>54770.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>宁夏回族自治区</th>\n",
       "      <td>4.174330</td>\n",
       "      <td>6805.468929</td>\n",
       "      <td>51265.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>辽宁省</th>\n",
       "      <td>44.712200</td>\n",
       "      <td>6758.671828</td>\n",
       "      <td>50767.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>云南省</th>\n",
       "      <td>33.437820</td>\n",
       "      <td>6680.165510</td>\n",
       "      <td>56150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽省</th>\n",
       "      <td>31.373190</td>\n",
       "      <td>6626.370767</td>\n",
       "      <td>53081.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>山东省</th>\n",
       "      <td>85.492470</td>\n",
       "      <td>6612.319619</td>\n",
       "      <td>51944.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>内蒙古自治区</th>\n",
       "      <td>14.058440</td>\n",
       "      <td>6553.743533</td>\n",
       "      <td>52288.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广西壮族自治区</th>\n",
       "      <td>26.044650</td>\n",
       "      <td>6544.237431</td>\n",
       "      <td>54245.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>海南省</th>\n",
       "      <td>7.056270</td>\n",
       "      <td>6509.319693</td>\n",
       "      <td>58403.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黑龙江省</th>\n",
       "      <td>39.692310</td>\n",
       "      <td>6431.899711</td>\n",
       "      <td>50907.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青海省</th>\n",
       "      <td>3.778810</td>\n",
       "      <td>6417.491678</td>\n",
       "      <td>52477.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>湖北省</th>\n",
       "      <td>40.620410</td>\n",
       "      <td>6395.396004</td>\n",
       "      <td>50961.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江西省</th>\n",
       "      <td>17.334400</td>\n",
       "      <td>6386.655241</td>\n",
       "      <td>50814.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陕西省</th>\n",
       "      <td>24.435750</td>\n",
       "      <td>6007.934363</td>\n",
       "      <td>48791.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河南省</th>\n",
       "      <td>75.040290</td>\n",
       "      <td>5924.593858</td>\n",
       "      <td>46683.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>吉林省</th>\n",
       "      <td>16.498950</td>\n",
       "      <td>5848.652683</td>\n",
       "      <td>47867.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河北省</th>\n",
       "      <td>37.288600</td>\n",
       "      <td>5492.869369</td>\n",
       "      <td>46280.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>山西省</th>\n",
       "      <td>28.578020</td>\n",
       "      <td>5407.193383</td>\n",
       "      <td>43710.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>甘肃省</th>\n",
       "      <td>9.343010</td>\n",
       "      <td>5401.641181</td>\n",
       "      <td>44523.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  数据                        \n",
       "                 min          mean       max\n",
       "地区                                          \n",
       "上海市        84.600000  16671.247534  139627.0\n",
       "北京市       105.165692  14371.685334  107731.0\n",
       "天津市        38.805610   9686.157402   76632.0\n",
       "浙江省        97.607180   9654.545929   77636.0\n",
       "西藏自治区       1.686520   9473.865907   80354.0\n",
       "广东省        97.200000   9333.879774   71209.0\n",
       "江苏省        80.125870   8779.187990   72843.0\n",
       "新疆维吾尔自治区   16.765430   8190.391353   66008.0\n",
       "福建省        36.929510   7913.008126   61504.0\n",
       "贵州省        23.899270   7661.444256   63243.0\n",
       "重庆市        27.854130   7427.716144   59596.0\n",
       "四川省        43.132070   7282.702139   56788.0\n",
       "湖南省        39.732650   6853.664206   54770.0\n",
       "宁夏回族自治区     4.174330   6805.468929   51265.0\n",
       "辽宁省        44.712200   6758.671828   50767.0\n",
       "云南省        33.437820   6680.165510   56150.0\n",
       "安徽省        31.373190   6626.370767   53081.0\n",
       "山东省        85.492470   6612.319619   51944.0\n",
       "内蒙古自治区     14.058440   6553.743533   52288.0\n",
       "广西壮族自治区    26.044650   6544.237431   54245.0\n",
       "海南省         7.056270   6509.319693   58403.0\n",
       "黑龙江省       39.692310   6431.899711   50907.0\n",
       "青海省         3.778810   6417.491678   52477.0\n",
       "湖北省        40.620410   6395.396004   50961.0\n",
       "江西省        17.334400   6386.655241   50814.0\n",
       "陕西省        24.435750   6007.934363   48791.0\n",
       "河南省        75.040290   5924.593858   46683.0\n",
       "吉林省        16.498950   5848.652683   47867.0\n",
       "河北省        37.288600   5492.869369   46280.0\n",
       "山西省        28.578020   5407.193383   43710.0\n",
       "甘肃省         9.343010   5401.641181   44523.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MultiIndex([('数据',  'min'),\n",
      "            ('数据', 'mean'),\n",
      "            ('数据',  'max')],\n",
      "           )\n"
     ]
    }
   ],
   "source": [
    "_df_ = ct.groupby(['地区']).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).sort_values(by = ('数据',\"mean\"),ascending = False)\n",
    "display(ct)\n",
    "display(_df_)\n",
    "print(_df_.columns)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>年</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>7.49941</td>\n",
       "      <td>10560.228108</td>\n",
       "      <td>139627.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>7.47547</td>\n",
       "      <td>9758.399315</td>\n",
       "      <td>127489.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>8.37898</td>\n",
       "      <td>9156.708428</td>\n",
       "      <td>117396.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>6.88443</td>\n",
       "      <td>8505.458568</td>\n",
       "      <td>107673.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <td>5.07767</td>\n",
       "      <td>7731.749476</td>\n",
       "      <td>100692.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>2.26419</td>\n",
       "      <td>6940.254676</td>\n",
       "      <td>91658.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011</th>\n",
       "      <td>1.93585</td>\n",
       "      <td>6132.333529</td>\n",
       "      <td>82882.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>2.30000</td>\n",
       "      <td>5239.304301</td>\n",
       "      <td>64150.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>1.68652</td>\n",
       "      <td>4521.921272</td>\n",
       "      <td>57948.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           数据                        \n",
       "          min          mean       max\n",
       "年                                    \n",
       "2017  7.49941  10560.228108  139627.0\n",
       "2016  7.47547   9758.399315  127489.0\n",
       "2015  8.37898   9156.708428  117396.0\n",
       "2014  6.88443   8505.458568  107673.0\n",
       "2013  5.07767   7731.749476  100692.0\n",
       "2012  2.26419   6940.254676   91658.0\n",
       "2011  1.93585   6132.333529   82882.0\n",
       "2010  2.30000   5239.304301   64150.0\n",
       "2009  1.68652   4521.921272   57948.0\n",
       "2018      NaN           NaN       NaN"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ct .groupby([\"年\"]).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).sort_values(by = ('数据',\"mean\"),ascending = False).head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th>行业指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">上海市</th>\n",
       "      <th>2017</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>1113.90906</td>\n",
       "      <td>70370.454530</td>\n",
       "      <td>139627.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>1008.19942</td>\n",
       "      <td>64248.599710</td>\n",
       "      <td>127489.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>916.75599</td>\n",
       "      <td>59156.377995</td>\n",
       "      <td>117396.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <th>2017</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>844.96340</td>\n",
       "      <td>54287.981700</td>\n",
       "      <td>107731.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <th>2014</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>832.62043</td>\n",
       "      <td>54252.810215</td>\n",
       "      <td>107673.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陕西省</th>\n",
       "      <th>2018</th>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">青海省</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">2018</th>\n",
       "      <th>国有</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">黑龙江省</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">2018</th>\n",
       "      <th>国有</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>620 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          数据                        \n",
       "                         min          mean       max\n",
       "地区   年    行业指标                                      \n",
       "上海市  2017 批发和零售业  1113.90906  70370.454530  139627.0\n",
       "     2016 批发和零售业  1008.19942  64248.599710  127489.0\n",
       "     2015 批发和零售业   916.75599  59156.377995  117396.0\n",
       "北京市  2017 批发和零售业   844.96340  54287.981700  107731.0\n",
       "上海市  2014 批发和零售业   832.62043  54252.810215  107673.0\n",
       "...                      ...           ...       ...\n",
       "陕西省  2018 批发和零售业         NaN           NaN       NaN\n",
       "青海省  2018 国有             NaN           NaN       NaN\n",
       "          批发和零售业         NaN           NaN       NaN\n",
       "黑龙江省 2018 国有             NaN           NaN       NaN\n",
       "          批发和零售业         NaN           NaN       NaN\n",
       "\n",
       "[620 rows x 3 columns]"
      ]
     },
     "execution_count": 114,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片.groupby([\"地区\",\"年\",\"行业指标\"]).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).sort_values(by = ('数据',\"mean\"),ascending = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "284.444px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
